X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=src%2Fcore.js;h=a86ef8dfbf23624233a8aa0bc91c9f137784103d;hb=99101e02f957087410cc0b5837ef09e3dfa12466;hp=a6d4c5f74b2a8ee97bbd51fb3ccf11d6278a1737;hpb=487567e82fed4f596b5f97bfbcd5c2429ca35bb0;p=jquery.git diff --git a/src/core.js b/src/core.js index a6d4c5f..a86ef8d 100644 --- a/src/core.js +++ b/src/core.js @@ -24,7 +24,10 @@ var jQuery = window.jQuery = window.$ = function( selector, context ) { var quickExpr = /^[^<]*(<(.|\s)+>)[^>]*$|^#(\w+)$/, // Is it a simple selector - isSimple = /^.[^:#\[\.]*$/; + isSimple = /^.[^:#\[\.]*$/, + +// Will speed up references to undefined, and allows munging its name. + undefined; jQuery.fn = jQuery.prototype = { init: function( selector, context ) { @@ -1174,7 +1177,7 @@ jQuery.extend({ // Go through the array, only saving the items // that pass the validator function for ( var i = 0, length = elems.length; i < length; i++ ) - if ( !inv && callback( elems[ i ], i ) || inv && !callback( elems[ i ], i ) ) + if ( !inv != !callback( elems[ i ], i ) ) ret.push( elems[ i ] ); return ret;