Bug Tracker

Modify

Ticket #8251 (closed bug: invalid)

Opened 3 years ago

Last modified 3 years ago

Specifying Class ID

Reported by: mavinm@… Owned by: mavinm@…
Priority: low Milestone: 1.next
Component: selector Version: 1.5
Keywords: Cc:
Blocking: Blocked by:

Description

Works in all browsers except for IE. When I have two divs:

<div class="class1" id="id"> ... </div> <div class="class2" id="id"> ... </div>

Internet Explorer does not recognize $(".class1#id).

Change History

comment:1 Changed 3 years ago by mavinm@…

Please see  http://jsfiddle.net/mavinm/hn8yL/9/ for an example and try it in IE.

comment:2 Changed 3 years ago by rwaldron

  • Owner set to mavinm@…
  • Status changed from new to pending
  • Component changed from unfiled to selector

Your example is invalid. id attributes must be unique

comment:3 Changed 3 years ago by jitter

  • Priority changed from undecided to low
  • Status changed from pending to closed
  • Resolution set to invalid

As rwaldron already stated. This isn't a jQuery bug, but your HTML markup is invalid.

Check  http://jsfiddle.net/jitter/Nq9CW/ and note how that works across browsers.

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.