#10627 closed bug (worksforme)
since 1.6.3 , $("radio").attr("checked") alway return a string "checked"
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | low | Milestone: | None |
Component: | attributes | Version: | 1.6.4 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
$("radio").attr("checked") alway return a string "checked"
Change History (2)
comment:1 Changed 11 years ago by
Component: | unfiled → attributes |
---|---|
Priority: | undecided → low |
Resolution: | → worksforme |
Status: | new → closed |
comment:2 Changed 11 years ago by
If you are trying to find the *currently* checked radio including any change that may have been made by the user, use $("radio").prop("checked")
since .attr()
represents the state in the HTML markup and is not changed by user actions.
Note: See
TracTickets for help on using
tickets.
Please see here for a test case that demonstrates the correct (and expected) behaviour with inputs of type 'radio' and 'checked': http://jsfiddle.net/EHjFa/. This isn't broken to the best of my knowledge.