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