Add support for .get(-Number) Closes #4188
This commit is contained in:
parent
e124fec5e9
commit
e532dfe522
2 changed files with 9 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue