@mdui/jq
Version:
拥有和 jQuery 相似 API 的轻量级 JavaScript 工具库
10 lines (9 loc) • 317 B
JavaScript
import { $ } from '../$.js';
import { map } from '../functions/map.js';
import { JQ } from '../shared/core.js';
// eslint-disable-next-line @typescript-eslint/no-explicit-any
$.fn.map = function (callback) {
return new JQ(map(this, (element, i) => {
return callback.call(element, i, element);
}));
};