git.asbjorn.biz
/
jquery.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add support for .get(-Number) Closes #4188
[jquery.git]
/
src
/
core.js
diff --git
a/src/core.js
b/src/core.js
index
35e6e34
..
1721bda
100644
(file)
--- a/
src/core.js
+++ b/
src/core.js
@@
-130,10
+130,10
@@
jQuery.fn = jQuery.prototype = {
return num == null ?
// Return a 'clean' array
return num == null ?
// Return a 'clean' array
- Array.prototype.slice.call( this ) :
+ this.toArray() :
// Return just the object
// 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
},
// Take an array of elements and push it onto the stack