aboutsummaryrefslogtreecommitdiffstats
path: root/src/traversing.js
diff options
context:
space:
mode:
authorJohn Resig <jeresig@gmail.com>2009-07-28 12:22:10 +0000
committerJohn Resig <jeresig@gmail.com>2009-07-28 12:22:10 +0000
commit61b18c866c57f9156f746b691517649f2ce628aa (patch)
treed15a1a3ede6d49b7f55e0a5cfb1d9bd4c9e00e8b /src/traversing.js
parentb7a3b220a8a2b5b0378c9f176ca5ae0f786a6fcf (diff)
downloadjquery-61b18c866c57f9156f746b691517649f2ce628aa.tar.gz
jquery-61b18c866c57f9156f746b691517649f2ce628aa.zip
Backing out commit #6507 - causes too many problems.
Diffstat (limited to 'src/traversing.js')
-rw-r--r--src/traversing.js5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/traversing.js b/src/traversing.js
index e8a89387d..db446cf81 100644
--- a/src/traversing.js
+++ b/src/traversing.js
@@ -53,12 +53,11 @@ jQuery.fn.extend({
closest: function( selector ) {
var pos = jQuery.expr.match.POS.test( selector ) ? jQuery(selector) : null,
- closer = 0,
- context = this.context;
+ closer = 0;
return this.map(function(){
var cur = this;
- while ( cur && cur.ownerDocument && cur !== context ) {
+ while ( cur && cur.ownerDocument ) {
if ( pos ? pos.index(cur) > -1 : jQuery(cur).is(selector) ) {
jQuery.data(cur, "closest", closer);
return cur;