Bug Tracker

Modify

Ticket #11282 (closed bug: invalid)

Opened 16 months ago

Last modified 16 months ago

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

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 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.

 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 16 months ago by rwaldron

Using multiple same IDs is invalid, use different IDs

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.