Skip to main content

Bug Tracker

Side navigation

#12454 closed bug (invalid)

Opened September 04, 2012 10:19AM UTC

Closed September 04, 2012 12:12PM UTC

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:
Description

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

<span>text</span>

</div>

</body>

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

context = Expr.find["ID"]( match[1], context, xml )[0];

when calling

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

Attachments (0)
Change History (1)

Changed September 04, 2012 12:12PM UTC by scottgonzalez comment:1

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.