jquery fx & event: replaced the use of .apply(), where .call() could had been used.
[jquery.git] / src / core.js
index a6d4c5f..a86ef8d 100644 (file)
@@ -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;