Core: Fix comments for .get() method

Closes gh-1547
(cherry picked from commit ca0086b55a)
This commit is contained in:
Benjy Cui 2014-03-18 17:15:58 +08:00 committed by Dave Methvin
parent c51f9f7650
commit 17d8df8eec
2 changed files with 4 additions and 2 deletions

View File

@ -208,3 +208,5 @@ Forbes Lindesay <forbes@lindesay.co.uk>
John Paul <john@johnkpaul.com> John Paul <john@johnkpaul.com>
S. Andrew Sheppard <andrew@wq.io> S. Andrew Sheppard <andrew@wq.io>
Roman Reiß <me@silverwind.io> Roman Reiß <me@silverwind.io>
Benjy Cui <benjytrys@gmail.com>

View File

@ -54,10 +54,10 @@ jQuery.fn = jQuery.prototype = {
get: function( num ) { get: function( num ) {
return num != null ? return num != null ?
// Return a 'clean' array // Return just the one element from the set
( num < 0 ? this[ num + this.length ] : this[ num ] ) : ( num < 0 ? this[ num + this.length ] : this[ num ] ) :
// Return just the object // Return all the elements in a clean array
slice.call( this ); slice.call( this );
}, },