X-Git-Url: http://git.asbjorn.it/?a=blobdiff_plain;f=src%2Fcore.js;h=a74f0fec9d69b7a6908bd21f913353019962691a;hb=1a7f72e7fe96654838074f88c79e021d37c5c30a;hp=267bc104f16a0ec07a16de9f4dc29f4663ef8d08;hpb=88bd74c732283cf8cd5e778439f0ea23654519d3;p=jquery.git diff --git a/src/core.js b/src/core.js index 267bc10..a74f0fe 100644 --- a/src/core.js +++ b/src/core.js @@ -43,9 +43,8 @@ jQuery.fn = jQuery.prototype = { // Handle $(DOMElement) if ( selector.nodeType ) { - this[0] = selector; + this.context = this[0] = selector; this.length++; - this.context = selector; return this; } @@ -132,7 +131,7 @@ jQuery.fn = jQuery.prototype = { this.toArray() : // Return just the object - ( num < 0 ? this.toArray.call(this, num)[0] : this[ num ] ); + ( num < 0 ? this.toArray(num)[ 0 ] : this[ num ] ); }, // Take an array of elements and push it onto the stack