Ticket #9102 (closed bug: wontfix)
attr() doesn't always return a string in jQuery 1.6 and lower
|Reported by:||Andy E||Owned by:||Andy E|
For Internet Explorer 7 and older, attr() may return a boolean or function type for certain attributes, for example "checked" or "onclick" respectively.
This is due to the old getAttribute bug that returns the DOM property value instead of the attribute string, which was finally fixed in IE 8. As a workaround, jQuery should make use of getAttributeNode rather than getAttribute.
This solution can be demonstrated by the following fiddle: http://jsfiddle.net/TbjRN/. Run it in IE's compatibility mode or IE 7 or IE 6.
- Owner set to timmywil
- Status changed from new to assigned
- Component changed from unfiled to attributes
- Owner changed from timmywil to Andy E
- Status changed from assigned to pending
- Keywords needsdocs added
- Status changed from new to closed
- Resolution set to wontfix