diff options
author | John Resig <jeresig@gmail.com> | 2007-09-10 00:00:30 +0000 |
---|---|---|
committer | John Resig <jeresig@gmail.com> | 2007-09-10 00:00:30 +0000 |
commit | 899ee03d37b6cbe6d0e8abc497026d611325cfba (patch) | |
tree | 6076f854dd72927f0156e05f2f65e5ab46d68d51 /src/selector.js | |
parent | f38251b2ce84a0ab6302475786c3e721dba2177c (diff) | |
download | jquery-899ee03d37b6cbe6d0e8abc497026d611325cfba.tar.gz jquery-899ee03d37b6cbe6d0e8abc497026d611325cfba.zip |
Fixed a bug in .dir() where it would return non-element nodes.
Diffstat (limited to 'src/selector.js')
-rw-r--r-- | src/selector.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/selector.js b/src/selector.js index 1fbbe9be6..f746fe11c 100644 --- a/src/selector.js +++ b/src/selector.js @@ -404,7 +404,8 @@ jQuery.extend({ var matched = []; var cur = elem[dir]; while ( cur && cur != document ) { - matched.push( cur ); + if ( cur.nodeType == 1 ) + matched.push( cur ); cur = cur[dir]; } return matched; |