diff options
author | MORGAN <morgan@morgangraphics.com> | 2012-10-16 10:25:08 -0400 |
---|---|---|
committer | Rick Waldron <waldron.rick@gmail.com> | 2012-10-16 10:25:08 -0400 |
commit | 4bb46f413a0e2f6933013b26d2aceddca6cf03f1 (patch) | |
tree | 1697b5a76869cd7d29111573a787bdaebbb81a8e /src/traversing.js | |
parent | ed9e34482a303e7e64c397f89533dbe64f51cfbf (diff) | |
download | jquery-4bb46f413a0e2f6933013b26d2aceddca6cf03f1.tar.gz jquery-4bb46f413a0e2f6933013b26d2aceddca6cf03f1.zip |
Return correct index for no-arg index() calls. Fixes #10977. Closes gh-971
Diffstat (limited to 'src/traversing.js')
-rw-r--r-- | src/traversing.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/traversing.js b/src/traversing.js index 4c58ae0b8..d92bec4cb 100644 --- a/src/traversing.js +++ b/src/traversing.js @@ -112,7 +112,7 @@ jQuery.fn.extend({ // No argument, return index in parent if ( !elem ) { - return ( this[0] && this[0].parentNode ) ? this.prevAll().length : -1; + return ( this[0] && this[0].parentNode ) ? this.first().prevAll().length : -1; } // index in selector |