Ticket #8751 (closed bug: duplicate)
Selector for [type=foo] does not work in IE7 and lower
|Reported by:||alexg||Owned by:|
Hi all, I'm a total noob at hacking jquery but while developing a webpage came accross this problem. In IE <=7 selectors such as $('input[type=checkbox]') don't work because of a known bug where element.getAttribute('type') returns a boolean. This is a big problem because some frameworks rely on these selectors.
I think I found a fix to this, which is to change the line 3671 in jquery-1.5.2 from:
return elem.getAttribute( "type" );
return elem.getAttributeNode( "type" ).nodeValue;
The non-shorthand version is one function call slower but works in all browsers.
I'd like someone more experienced with jquery to review this and patch the code if appropriate.