Skip to main content

Bug Tracker

Side navigation

#8251 closed bug (invalid)

Opened February 11, 2011 07:05PM UTC

Closed February 11, 2011 08:24PM UTC

Specifying Class ID

Reported by: mavinm@sci.utah.edu Owned by: mavinm@sci.utah.edu
Priority: low Milestone: 1.next
Component: selector Version: 1.5
Keywords: Cc:
Blocked by: Blocking:
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).

Attachments (0)
Change History (3)

Changed February 11, 2011 07:23PM UTC by mavinm@sci.utah.edu comment:1

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

Changed February 11, 2011 08:16PM UTC by rwaldron comment:2

component: unfiledselector
owner: → mavinm@sci.utah.edu
status: newpending

Your example is invalid. id attributes must be unique

Changed February 11, 2011 08:24PM UTC by jitter comment:3

priority: undecidedlow
resolution: → invalid
status: pendingclosed

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.