X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;ds=sidebyside;f=src%2Fcore.js;h=944e8a9bf7ec8c06089ea4cb8a3f7175fc022cf3;hb=7b0b348419c85841671459b4d7153afc88d1fa83;hp=67b4574bec78e6aa77ead421577697bb234fc435;hpb=67b3be24e1215609cca524ee8158fc7e6e80db93;p=jquery.git diff --git a/src/core.js b/src/core.js index 67b4574..944e8a9 100644 --- a/src/core.js +++ b/src/core.js @@ -164,7 +164,7 @@ jQuery.fn = jQuery.prototype = { return this.length; }, - toArray: function(){ + toArray: function() { return slice.call( this, 0 ); }, @@ -258,7 +258,7 @@ jQuery.fn = jQuery.prototype = { }, map: function( callback ) { - return this.pushStack( jQuery.map(this, function(elem, i){ + return this.pushStack( jQuery.map(this, function( elem, i ) { return callback.call( elem, i, elem ); })); }, @@ -379,7 +379,10 @@ jQuery.extend({ }, bindReady: function() { - if ( readyBound ) { return; } + if ( readyBound ) { + return; + } + readyBound = true; // Catch cases where $(document).ready() is called after the @@ -411,7 +414,7 @@ jQuery.extend({ try { toplevel = window.frameElement == null; - } catch(e){} + } catch(e) {} if ( document.documentElement.doScroll && toplevel ) { doScrollCheck(); @@ -434,7 +437,7 @@ jQuery.extend({ // Must be an Object. // Because of IE, we also have to check the presence of the constructor property. // Make sure that DOM nodes and window objects don't pass through, as well - if ( !obj || toString.call(obj) !== "[object Object]" || !("constructor" in obj) || obj.nodeType || obj.setInterval ) { + if ( !obj || toString.call(obj) !== "[object Object]" || obj.nodeType || obj.setInterval ) { return false; } @@ -614,7 +617,7 @@ jQuery.extend({ // Use of jQuery.browser is frowned upon. // More details: http://docs.jquery.com/Utilities/jQuery.browser browser: { - version: (/.*?(?:firefox|safari|opera|msie)[\/ ]([\d.]+)/.exec(userAgent) || [0,'0'])[1], + version: (/.*?(?:firefox|safari|opera|msie)[\/ ]([\d.]+)/.exec(userAgent) || [0,"0"])[1], safari: /safari/.test( userAgent ), opera: /opera/.test( userAgent ), msie: /msie/.test( userAgent ) && !/opera/.test( userAgent ),