Bug Tracker

Opened 12 years ago

Closed 12 years ago

Last modified 11 years ago

#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:


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 timmywil

Component: unfiledattributes
Milestone: 1.next1.6.1
Priority: undecidedlow
Resolution: fixed
Status: newclosed

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.

comment:2 Changed 12 years ago by anonymous

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 anonymous


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 timmywil

Seems to work on attributes to me: http://jsfiddle.net/timmywil/5DTfu/1/

Note: See TracTickets for help on using tickets.