Fixed a bug in .dir() where it would return non-element nodes.
This commit is contained in:
parent
f38251b2ce
commit
899ee03d37
|
@ -404,6 +404,7 @@ jQuery.extend({
|
||||||
var matched = [];
|
var matched = [];
|
||||||
var cur = elem[dir];
|
var cur = elem[dir];
|
||||||
while ( cur && cur != document ) {
|
while ( cur && cur != document ) {
|
||||||
|
if ( cur.nodeType == 1 )
|
||||||
matched.push( cur );
|
matched.push( cur );
|
||||||
cur = cur[dir];
|
cur = cur[dir];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue