aboutsummaryrefslogtreecommitdiffstats
path: root/src/selector.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/selector.js')
-rw-r--r--src/selector.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/selector.js b/src/selector.js
index 0dadeb453..1fbbe9be6 100644
--- a/src/selector.js
+++ b/src/selector.js
@@ -400,12 +400,12 @@ jQuery.extend({
return { r: r, t: t };
},
- parents: function( elem ){
+ dir: function( elem, dir ){
var matched = [];
- var cur = elem.parentNode;
+ var cur = elem[dir];
while ( cur && cur != document ) {
matched.push( cur );
- cur = cur.parentNode;
+ cur = cur[dir];
}
return matched;
},