aboutsummaryrefslogtreecommitdiffstats
path: root/src/traversing.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/traversing.js')
-rw-r--r--src/traversing.js2
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