X-Git-Url: http://git.asbjorn.it/?a=blobdiff_plain;f=src%2Fjquery%2Fjquery.js;h=9f2189eb9e0bb625f8b9b8ee86f46316742d9246;hb=3b4eeab0444e7295802a4f090257ac5dac6f556a;hp=5861b2d9bd8f3be6527920ca20ab71041dcb2067;hpb=b240975a919eacfdaf14a77bb8e270502133e2c4;p=jquery.git diff --git a/src/jquery/jquery.js b/src/jquery/jquery.js index 5861b2d..9f2189e 100644 --- a/src/jquery/jquery.js +++ b/src/jquery/jquery.js @@ -31,7 +31,7 @@ window.undefined = window.undefined; jQuery = function(a,c) { // Shortcut for document ready (because $(document).each() is silly) - if ( a && a.constructor == Function && jQuery.fn.ready ) + if ( a && typeof a == "function" && jQuery.fn.ready ) return jQuery(document).ready(a); // Make sure that a selection was provided @@ -65,7 +65,7 @@ jQuery = function(a,c) { var fn = arguments[ arguments.length - 1 ]; // If so, execute it in context - if ( fn && fn.constructor == Function ) + if ( fn && typeof fn == "function" ) this.each(fn); }; @@ -1019,7 +1019,7 @@ jQuery.fn = jQuery.prototype = { t.constructor == Boolean && ( t ? this.get() : [] ) || - t.constructor == Function && + typeof t == "function" && jQuery.grep( this, t ) || jQuery.filter(t,this).r, arguments ); @@ -1214,7 +1214,7 @@ jQuery.fn = jQuery.prototype = { } else { var old = this.get(); this.get( a ); - if ( fn.constructor == Function ) + if ( typeof fn == "function" ) this.each( fn ); this.get( old ); }