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: |
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
when calling
$("#themeRoller span").toggleClass("myClass");
It's invalid to have multiple elements with the same ID. ThemeRoller will be fixed, but this is not a bug in jQuery.