not function old if typeof old object old old elements old cur this el

 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
not: function( old ){
if( typeof old == 'object' ) {
old = old.elements || old, cur = this.elements;
var temp = [], a = [], k = -1, el, key, c = 0;
while( el = old[++k] ){
key = el.tagName + el.id + el.className + el.name + el.style;
if (temp[key]) { temp[key]++; } else { temp[key] = 1; }
}
k = -1;
while( el = cur[++k] ){
key = el.tagName + el.id + el.className + el.name + el.style;
if (temp[key]) {
if (temp[key] == 0) { return false; } else { temp[key]--; }
} else
a[c++] = el;
}
}
return this.sync(a);
}