Bug Tracker

Ticket #9089 (closed bug: fixed)

Opened 4 years ago

Last modified 3 years ago

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:
Blocking: Blocked by:

Description

 http://jsfiddle.net/67ced/ Check the exmaple ablove

The checkbox behaves differently in IE7,8 compare to FF, Chrome, IE9

Change History

comment:1 Changed 4 years ago by timmywil

  • Priority changed from undecided to low
  • Resolution set to fixed
  • Status changed from new to closed
  • Component changed from unfiled to attributes
  • Milestone changed from 1.next to 1.6.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.

comment:2 Changed 4 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 4 years ago by anonymous

 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.

comment:4 Changed 4 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.