Skip to main content

Bug Tracker

Side navigation

#9089 closed bug (fixed)

Opened May 04, 2011 09:07AM UTC

Closed May 04, 2011 02:18PM UTC

Last modified March 08, 2012 06:54PM UTC

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

Attachments (0)
Change History (4)

Changed May 04, 2011 02:18PM UTC by timmywil comment:1

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.

Changed May 06, 2011 11:56AM UTC by anonymous comment:2

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?

Changed May 06, 2011 12:10PM UTC by anonymous comment:3

http://jsfiddle.net/5DTfu/

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.

Changed May 06, 2011 03:48PM UTC by timmywil comment:4

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