Modify ↓
Ticket #6021 (closed bug: worksforme)
IE7 + ID selector + HTML5 = fail
| Reported by: | Kanuck | Owned by: | john |
|---|---|---|---|
| Priority: | major | Milestone: | 1.4.2 |
| Component: | selector | Version: | 1.4.1 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
I'm using an HTML5 "shiv" to document.createElement("nav") (along with the other HTML5 elements) so that Internet Explorer will recognize it, and I have a <nav id="mainnav"> block in my document.
In Internet Explorer 7, selectors don't work right on these new elements. For instance:
jQuery("nav").width() returns 960, jQuery("#mainnav").width() returns 960, but jQuery("nav#mainnav").width() returns null.
Works as intended in IE8 and WebKit.
Change History
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.
Note: See
TracTickets for help on using
tickets.

What version of jQuery? This was fixed in jQuery 1.4.