diff options
author | Ben Alman <cowboy@rj3.net> | 2010-01-21 09:10:34 +0800 |
---|---|---|
committer | John Resig <jeresig@gmail.com> | 2010-01-24 01:20:53 +0800 |
commit | 28ce15979f69903f2fe1187705b190968757ddf7 (patch) | |
tree | b89b8c024cd5f7a5f17fb248ae3288d39fcec60e /src/traversing.js | |
parent | 09ef5b7598bcdd9e6c254b24b55a54e6bfb2b4ca (diff) | |
download | jquery-28ce15979f69903f2fe1187705b190968757ddf7.tar.gz jquery-28ce15979f69903f2fe1187705b190968757ddf7.zip |
fixed jQuery.dir regression introduced with 1.4 *untils patch that errored when traversing XHTML text nodes with an until test
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 d0dd52db8..bf17b8ad8 100644 --- a/src/traversing.js +++ b/src/traversing.js @@ -235,7 +235,7 @@ jQuery.extend({ dir: function( elem, dir, until ) { var matched = [], cur = elem[dir]; - while ( cur && cur.nodeType !== 9 && (until === undefined || !jQuery( cur ).is( until )) ) { + while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) { if ( cur.nodeType === 1 ) { matched.push( cur ); } |