Side navigation
#12396 closed bug (invalid)
Opened August 25, 2012 11:20AM UTC
Closed August 25, 2012 11:58AM UTC
Last modified October 08, 2012 12:10PM UTC
.find() : Getting the descendants filtered by a #id selector is only returning the first children.
| Reported by: | blindOSX | Owned by: | |
|---|---|---|---|
| Priority: | undecided | Milestone: | None |
| Component: | traversing | Version: | 1.8.0 |
| Keywords: | Cc: | ||
| Blocked by: | Blocking: |
Description
I think the .find() function is not working properly.
Getting the descendants filtered by a #id selector is only returning the first children.
Attachments (0)
Change History (2)
Changed August 25, 2012 11:58AM UTC by comment:1
| component: | unfiled → traversing |
|---|---|
| resolution: | → invalid |
| status: | new → closed |
Changed October 08, 2012 12:10PM UTC by comment:2
It's worth noting that although this bug is invalid, the behaviour of jQuery prior to version 1.8 was to return multiple results from the find() function even when using an #Id selector.
See this example with jQuery 1.7.2
This is a potentially breaking change if code was relying on the previous incorrect behaviour of jQuery.
Your markup is invalid;
#idselectors match at most one element because everyidattribute in a document should have a unique value.