expando值,如jqueryExpando00001;
uuid值,如1;
cache塊,cache[uuid]=緩存內(nèi)容;
dom關(guān)聯(lián)expando和uuid,即dom[expando]=uuid
是這樣理解吧
uuid值,如1;
cache塊,cache[uuid]=緩存內(nèi)容;
dom關(guān)聯(lián)expando和uuid,即dom[expando]=uuid
是這樣理解吧
2016-12-15
前兩節(jié)我就在思考那個(gè)過(guò)濾的例子二,原來(lái)答案在后面,我之前研究了1個(gè)小時(shí)啊TT,老師你當(dāng)時(shí)就不能說(shuō)一句留給疑問(wèn)后面回答嘛QAQ
2016-12-13
ajQuery.fn.extend({
get: function(num) {
if (num != null) {
return (num < 0 ? this[num + this.length] : this[num]);
} else {
return [].slice.call(this);
}
},
first: function() {
return this[0];
},
last: function(){
return this[this.length-1];
}
})
get: function(num) {
if (num != null) {
return (num < 0 ? this[num + this.length] : this[num]);
} else {
return [].slice.call(this);
}
},
first: function() {
return this[0];
},
last: function(){
return this[this.length-1];
}
})
2016-12-13
一個(gè)元素可能有若干子元素,如果每一個(gè)都去判斷一下顯然性能太差。而一個(gè)子元素只有一個(gè)父元素,所以找起來(lái)非常方便
2016-12-11
看懂了源碼,就可以了。當(dāng)然 得先看Callbacks源碼,再來(lái)看defer
2016-12-03