Bug Tracker

Modify

Ticket #6021 (closed bug: worksforme)

Opened 3 years ago

Last modified 3 years ago

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

comment:1 Changed 3 years ago by john

  • Status changed from new to closed
  • Resolution set to worksforme

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

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.