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: Owned by:
Priority: low Milestone:
Component: selector Version: 1.5
Keywords: Cc:
Blocked by: Blocking:

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

<div class="class1" id="id">



<div class="class2" id="id">



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

Attachments (0)
Change History (3)

Changed February 11, 2011 07:23PM UTC by comment:1

Please see for an example and try it in IE.

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

component: unfiledselector
owner: →
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 and note how that works across browsers.