Opened 14 years ago
Closed 13 years ago
#4528 closed bug (wontfix)
parent > child selector doesn't work as expected if the child tag is an id that isn't unique
Reported by: | piev | Owned by: | john |
---|---|---|---|
Priority: | major | Milestone: | 1.4 |
Component: | selector | Version: | 1.3.2 |
Keywords: | parent, child, selector | Cc: | |
Blocked by: | Blocking: |
Description
$('#id1 > #id2') does not return the existing object if its id ("id2") isn't unique.
Example:
<div id="test1">something goes here</div>
<div id="localHolding">
<div id="test1">Hello World</div>
<div id="test2">Hello Universe</div>
</div>
Then in the script section: $('#localHolding > #test1').length=0;
Note: Previous versions (1.2.6) did handle this as expected.
Attachments (1)
Change History (3)
Changed 14 years ago by
Attachment: | jquery_bug.htm added |
---|
comment:1 Changed 13 years ago by
This ticket should be marked as invalid. The id attribute is required to be unique.
comment:2 Changed 13 years ago by
Resolution: | → wontfix |
---|---|
Status: | new → closed |
This is going to have to be something that we'll punt on. In 1.2.6 #id1 > #id2 would fail if there were multiple #id1s, since in 1.3 we work right to left we just fail the other way around. We're going to have to pass on this, for performance reasons.
html file illustrating unexpected behaviour (bug)