这个问题大家看看吧
init: function(selector) {
this.selector = selector;
return this;
},
为什么要return this呢?
这是jquery源码里的问题var $$ = ajQuery = function(selector) {
return new ajQuery.fn.init(selector);
}
ajQuery.fn = ajQuery.prototype = {
init:
}
init: function(selector) {
this.selector = selector;
return this;
},
为什么要return this呢?
这是jquery源码里的问题var $$ = ajQuery = function(selector) {
return new ajQuery.fn.init(selector);
}
ajQuery.fn = ajQuery.prototype = {
init:
}
2016-08-09
举报