@mdui/jq
Version:
拥有和 jQuery 相似 API 的轻量级 JavaScript 工具库
13 lines (12 loc) • 405 B
JavaScript
import { $ } from '../$.js';
import { removeAttribute } from '../shared/attributes.js';
import { eachArray } from '../shared/helper.js';
import './each.js';
$.fn.removeAttr = function (attributeName) {
const names = attributeName.split(' ').filter((name) => name);
return this.each(function () {
eachArray(names, (name) => {
removeAttribute(this, name);
});
});
};