#9089 closed bug (fixed)
1.6 atrr() Inconsistant in IE7,8
Reported by: | Shawn | Owned by: | |
---|---|---|---|
Priority: | low | Milestone: | 1.6.1 |
Component: | attributes | Version: | 1.6 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
http://jsfiddle.net/67ced/ Check the exmaple ablove
The checkbox behaves differently in IE7,8 compare to FF, Chrome, IE9
Change History (4)
comment:1 Changed 12 years ago by
Component: | unfiled → attributes |
---|---|
Milestone: | 1.next → 1.6.1 |
Priority: | undecided → low |
Resolution: | → fixed |
Status: | new → closed |
comment:2 Changed 12 years ago by
Thanks for the fix.
Just want to get clear with the confusions with this new attr().
Basically, from what I understand is .attr() before 1.5.2 is now represent by .prop() in 1.6
Then the question is, how about all the attribute selectors, e.g. $("input:[checked='true']");
Are they still filtering based on attribute value or property values?
comment:3 Changed 12 years ago by
Based on this example, it seems the attribute selector is filtering on property values.
So the attribute selector across the document should be renamed to property selector, cause it really confuse people.
comment:4 Changed 12 years ago by
Seems to work on attributes to me: http://jsfiddle.net/timmywil/5DTfu/1/
elem.checked, .prop('checked'), or .is(':checked') should be used to check the current value of a checkbox. However, it was discussed by the jQuery team and boolean properties such as checked will function in attr as before in jQuery 1.6.1.