X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=src%2Fcore.js;h=1721bdacf7bb46136735d4b89392e65b251aacb8;hb=e532dfe5228217f55a33122a4438fd70522dbb4b;hp=35e6e344d7ff760c0c4152bb2a045b3390718040;hpb=e124fec5e9cfee77cb23b27c0d43dc2631c83aab;p=jquery.git diff --git a/src/core.js b/src/core.js index 35e6e34..1721bda 100644 --- a/src/core.js +++ b/src/core.js @@ -130,10 +130,10 @@ jQuery.fn = jQuery.prototype = { return num == null ? // Return a 'clean' array - Array.prototype.slice.call( this ) : + this.toArray() : // Return just the object - this[ num ]; + ( num < 0 ? this.toArray.call(this, num)[0] : this[ num ] ); }, // Take an array of elements and push it onto the stack