git.asbjorn.biz
/
jquery.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added a number of additional speed gains (we now hold our own against Dojo and DOMQue...
[jquery.git]
/
src
/
jquery
/
jquery.js
diff --git
a/src/jquery/jquery.js
b/src/jquery/jquery.js
index
a8872df
..
ddb08a4
100644
(file)
--- a/
src/jquery/jquery.js
+++ b/
src/jquery/jquery.js
@@
-1345,10
+1345,7
@@
jQuery.extend({
// internal only, use is(".class")
has: function( t, c ) {
// internal only, use is(".class")
has: function( t, c ) {
- t = t.className || t;
- // escape regex characters
- c = c.replace(/([\.\\\+\*\?\[\^\]\$\(\)\{\}\=\!\<\>\|\:])/g, "\\$1");
- return t && new RegExp("(^|\\s)" + c + "(\\s|$)").test( t );
+ return jQuery.inArray( c, (t.className || t).toString().split(/\s+/) ) > -1;
}
},
}
},
@@
-1629,9
+1626,10
@@
jQuery.extend({
* @cat JavaScript
*/
merge: function(first, second) {
* @cat JavaScript
*/
merge: function(first, second) {
- for ( var i = 0, sl = second.length; i < sl; i++ )
+ // We have to loop this way because IE & Opera overwrite the length
+ // expando of getElementsByTagName
+ for ( var i = 0; second[i]; i++ )
first.push(second[i]);
first.push(second[i]);
-
return first;
},
return first;
},