Skip to content
Permalink
Browse files
Fixed a bug in .dir() where it would return non-element nodes.
  • Loading branch information
jeresig committed Sep 10, 2007
1 parent f38251b commit 899ee03
Showing 1 changed file with 2 additions and 1 deletion.
@@ -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;

0 comments on commit 899ee03

Please sign in to comment.