Bug Tracker

Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#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:
Blocked by: Blocking:

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 (3)

comment:1 Changed 10 years ago by sindresorhus

Component: unfiledselector
Priority: undecidedlow
Resolution: invalid
Status: newclosed

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/

comment:2 in reply to:  1 Changed 10 years 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.

http://jsfiddle.net/etf37/2/

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/

comment:3 Changed 10 years ago by Rick Waldron

Using multiple same IDs is invalid, use different IDs

Note: See TracTickets for help on using tickets.