git.asbjorn.biz
/
jquery.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f38251b
)
Fixed a bug in .dir() where it would return non-element nodes.
author
John Resig
<jeresig@gmail.com>
Mon, 10 Sep 2007 00:00:30 +0000
(
00:00
+0000)
committer
John Resig
<jeresig@gmail.com>
Mon, 10 Sep 2007 00:00:30 +0000
(
00:00
+0000)
src/selector.js
patch
|
blob
|
history
diff --git
a/src/selector.js
b/src/selector.js
index
1fbbe9b
..
f746fe1
100644
(file)
--- 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;