Bug Tracker

Opened 11 years ago

Closed 11 years ago

#12454 closed bug (invalid)

Selector method doesn't work in IE7 when getting element by tag name within element with ID.

Reported by: snb Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.8.0
Keywords: Cc:
Blocked by: Blocking:


An exception occurred in the IE7 (or in IE8/IE9 in the Compability Mode) when using the following selector $('#[ID] [TagName]') and if another element with the same ID but with different letter case exists in the same document. For example, this bug is raised on the jQuery UI ThemeRoller main page (http://jqueryui.com/themeroller/).

Example: <body id="themeroller">

<div id="themeRoller">




Exception SCRIPT5007: Unable to get value of the property '0': object is null or undefined is raised in JQuery 1.8, line

context = Expr.findID?( match[1], context, xml )[0];

when calling

$("#themeRoller span").toggleClass("myClass");

Change History (1)

comment:1 Changed 11 years ago by scottgonzalez

Resolution: invalid
Status: newclosed

It's invalid to have multiple elements with the same ID. ThemeRoller will be fixed, but this is not a bug in jQuery.

Note: See TracTickets for help on using tickets.