Side navigation
#4755 closed bug (worksforme)
Opened June 12, 2009 03:27PM UTC
Closed October 29, 2010 06:39PM UTC
Unable to match HTML nodes with $(n1).find("*").is(n2)
Reported by: | sigr0005 | Owned by: | sigr0005 |
---|---|---|---|
Priority: | major | Milestone: | 1.4 |
Component: | selector | Version: | 1.3.2 |
Keywords: | traversing, is, events | Cc: | |
Blocked by: | Blocking: |
Description
Problem:
var e2 = [e1 is a child of e2 but could also be e2];
$(e1).mouseleave(function() {
event.stopPropagation();
isChild = $(e2).find("*").andSelf().is(e1);
if(isChild) alert("This alert is NEVER reached :(");
});
Solution:
replace isChild so that,
isChild = e2.find("*").andSelf().not(e2.find("*").andSelf().not(e1)).is(e1);
It appears that "not()" is the only traversing function working in this case.
Attachments (0)
Change History (4)
Changed June 16, 2009 01:31AM UTC by comment:1
Changed October 29, 2010 06:13AM UTC by comment:2
owner: | john → sigr0005 |
---|---|
status: | new → pending |
Please submit your ticket with a test case reproducing this issue on jsFiddle.
Changed October 29, 2010 04:17PM UTC by comment:3
status: | pending → new |
---|
Changed October 29, 2010 06:39PM UTC by comment:4
resolution: | → worksforme |
---|---|
status: | new → closed |
Can you attach a complete test case? Thanks.