Ticket #11282 (closed bug: invalid)
IE7 : Multiple same ID selector only select the first one
| Reported by: | frackher@… | Owned by: | |
|---|---|---|---|
| Priority: | low | Milestone: | None |
| Component: | selector | Version: | 1.7.1 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
On IE7 (maybe be all IE versions lesser than IE8). If you have multiple elements with the same ID (Ya I know this is bad), and you want use selector like that $(".class #id").doSomething Only the first element will be affected.
Change History
comment:1 follow-up: ↓ 2 Changed 16 months ago by sindresorhus
- Priority changed from undecided to low
- Resolution set to invalid
- Status changed from new to closed
- Component changed from unfiled to selector
comment:2 in reply to: ↑ 1 Changed 16 months ago by Shinji
Sorry, maybe I've explained not well.
Here is an example where only Oregon is hide on IE7. On the other browsers all are hidden.
Replying to sindresorhus:
Thanks for taking the time to try to contribute to the jQuery project but this is not a valid bug. This bug tracker is not a support forum, and is only for solving reproducible, verifiable bugs with jQuery Core itself.
Even though you really shouldn't, you can use an attribute selector: http://jsfiddle.net/mofle/uSyzy/
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

Thanks for taking the time to try to contribute to the jQuery project but this is not a valid bug. This bug tracker is not a support forum, and is only for solving reproducible, verifiable bugs with jQuery Core itself.
Even though you really shouldn't, you can use an attribute selector: http://jsfiddle.net/mofle/uSyzy/