diff options
author | Benjy Cui <benjytrys@gmail.com> | 2014-03-18 17:15:58 +0800 |
---|---|---|
committer | Dave Methvin <dave.methvin@gmail.com> | 2014-03-20 12:52:22 -0400 |
commit | 17d8df8eec5a11d290d7b8cdbbb7247d2cdb7633 (patch) | |
tree | 626cee75bab66c1652c1b44371bb801b52e04fa2 | |
parent | c51f9f7650457239c28f74a6f77f60432cf61b19 (diff) | |
download | jquery-17d8df8eec5a11d290d7b8cdbbb7247d2cdb7633.tar.gz jquery-17d8df8eec5a11d290d7b8cdbbb7247d2cdb7633.zip |
Core: Fix comments for .get() method
Closes gh-1547
(cherry picked from commit ca0086b55a158d8a4347f94254878d6dc5dd90ed)
-rw-r--r-- | AUTHORS.txt | 2 | ||||
-rw-r--r-- | src/core.js | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/AUTHORS.txt b/AUTHORS.txt index 9c734c4ef..9bda6ee1d 100644 --- a/AUTHORS.txt +++ b/AUTHORS.txt @@ -208,3 +208,5 @@ Forbes Lindesay <forbes@lindesay.co.uk> John Paul <john@johnkpaul.com> S. Andrew Sheppard <andrew@wq.io> Roman Reiß <me@silverwind.io> +Benjy Cui <benjytrys@gmail.com> + diff --git a/src/core.js b/src/core.js index f09d872b2..d3501041e 100644 --- a/src/core.js +++ b/src/core.js @@ -54,10 +54,10 @@ jQuery.fn = jQuery.prototype = { get: function( num ) { return num != null ? - // Return a 'clean' array + // Return just the one element from the set ( num < 0 ? this[ num + this.length ] : this[ num ] ) : - // Return just the object + // Return all the elements in a clean array slice.call( this ); }, |