-
Notifications
You must be signed in to change notification settings - Fork 6
/
wfQuery.js
59 lines (46 loc) · 1.37 KB
/
wfQuery.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
/**
* @file jQuery-API 简单实现, gzip < 4k 方便移动端调用
* 1. 基于Array.prototype
* 2. 选择器直接使用 querySelectorAll
* 3. 事件绑定仅支持 on/off/trigger, 支持代理(阻止事件冒泡)
* 4. 不支持 animate 相关
* 5. Ajax支持基于ajax2.0的文件上传和进度设置
* @author shiyangyang([email protected])
* @namespace wfquery
*/
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
define(factory);
}
else {
root.wfQuery = factory();
window.$ = window.$ || root.wfQuery;
}
}(this, function () {
var doc = window.document;
var pto = Object.prototype;
/**
* like jQuery extends Array
*
* @exports wfQuery
* @extends Array
* @param {string} selector 选择器可以是:css选择器、html片段或者DOMCollection等
* @param {string} context 使用css选择器时包含标签
* @return {wfQuery}
*/
var wfQuery = function (selector, context) {
return new wfQuery.fn.Init(selector, context);
};
$include[js/init.js]
$include[js/extend.js]
$include[js/util.js]
$include[js/base.js]
$include[js/serialize.js]
$include[js/query.js]
$include[js/dom.js]
$include[js/attr.js]
$include[js/css.js]
$include[js/event.js]
$include[js/ajax.js]
return wfQuery;
}));