#13245 closed bug (notabug)
Checkbox checked state behaviour diff after upgrade to 1.9
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | undecided | Milestone: | None |
Component: | unfiled | Version: | 1.9.0 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Hello!
I see the difference between 1.9 and 1.8.x in case of multiple clicks on first checkbox here: http://jsfiddle.net/zKs8S/
Sorry if dup :)
Change History (28)
comment:1 Changed 10 years ago by
Resolution: | → notabug |
---|---|
Status: | new → closed |
comment:25 Changed 9 years ago by
HTML:
<div id="sample"> <input type="checkbox"> <input type="checkbox"> <input type="checkbox"> <div> <input id="checkAll" type="checkbox">
JQuery
$("#checkAll").click(function() { var checked = $(this).is(":checked"); // hack $("div#sample input[type=checkbox]").each(function() { $(this)[0].checked = checked; }); });
Note: See
TracTickets for help on using
tickets.
Use
.prop()
to get or set the dynamic, changing, visual state of a checkbox.http://jquery.com/upgrade-guide/1.9/#attr-versus-prop-