#9358 closed bug (wontfix)
.attr -> .prob in version 1.6.1
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | low | Milestone: | 1.next |
Component: | attributes | Version: | 1.6.1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Hello,
Even though te supposed fix in 1.6.1, the following still breaks when upgrading from 1.5.8:
var selectedIndex; selectedIndex = $("#year_week").attr("selectedIndex"); $("#year_week").attr('selectedIndex', Math.max(selectedIndex - 1,0)); change_week();
The "attr" method doesnt work anymore. Replacing by .prob fixes the issue.
Change History (2)
comment:1 Changed 11 years ago by
Component: | unfiled → attributes |
---|---|
Priority: | undecided → low |
Resolution: | → wontfix |
Status: | new → closed |
comment:2 Changed 11 years ago by
Yes, .attr()
is clearly wrong there since selectedIndex
is always a property and never an attribute. That is different than situations like checked
where the boolean attribute is reflected into a property.
Note: See
TracTickets for help on using
tickets.
Please see the blog post for 1.6.1 release. This explains some of the differences between attributes and properties. selectedIndex and a few of the other rare cases did work with attr in the past, but attr did not officially support these properties. prop is the correct method.