X-Git-Url: http://git.asbjorn.it/?a=blobdiff_plain;f=src%2Fcore.js;h=793f122ac691ab7f0b250da08204b3705e381096;hb=dee8e45ef35b4e97693a03c8199e7556823cf5c3;hp=6eeb9a67eca4c3e1f808c7f3eb22ef8fef840c00;hpb=c2bbcd88335cf6f8df4ac9389ecbae90291377fb;p=jquery.git diff --git a/src/core.js b/src/core.js index 6eeb9a6..793f122 100644 --- a/src/core.js +++ b/src/core.js @@ -56,7 +56,7 @@ jQuery.fn = jQuery.prototype = { // Handle $(DOMElement) if ( selector.nodeType ) { this.context = this[0] = selector; - this.length++; + this.length = 1; return this; } @@ -96,7 +96,7 @@ jQuery.fn = jQuery.prototype = { } // Otherwise, we inject the element directly into the jQuery object - this.length++; + this.length = 1; this[0] = elem; } @@ -280,7 +280,7 @@ jQuery.extend = jQuery.fn.extend = function() { clone = src; } else if ( jQuery.isArray(copy) ) { clone = []; - } else if ( jQuery.isObject(copy) ) { + } else if ( jQuery.isObjectLiteral(copy) ) { clone = {}; } else { clone = copy; @@ -323,7 +323,7 @@ jQuery.extend({ return toString.call(obj) === "[object Array]"; }, - isObject: function( obj ) { + isObjectLiteral: function( obj ) { if ( toString.call(obj) !== "[object Object]" ) { return false; }