Skip to main content

Bug Tracker

Side navigation

#11282 closed bug (invalid)

Opened February 06, 2012 10:59AM UTC

Closed February 06, 2012 11:03AM UTC

Last modified February 06, 2012 01:16PM UTC

IE7 : Multiple same ID selector only select the first one

Reported by: frackher@wanadoo.fr 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.

Attachments (0)
Change History (3)

Changed February 06, 2012 11:03AM UTC by sindresorhus comment:1

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/

Changed February 06, 2012 11:19AM UTC by Shinji comment:2

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 [comment:1 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/

Changed February 06, 2012 01:16PM UTC by rwaldron comment:3

Using multiple same IDs is invalid, use different IDs