-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Closed
Description
For example, I want to checked/unchecked all item by <input type="checkbox" id="all" />. In my case, checked attribute is changed but it does not display (http://jsfiddle.net/Lvmy64w0/2/)
<form action="#">
<p>
<input type="checkbox" id="all" />
<label for="all">SelectAll</label>
</p>
<p>
<input class="item" type="checkbox" id="test5" />
<label for="test5">Red</label>
</p>
<p>
<input class="item" type="checkbox" id="test6" checked="checked" />
<label for="test6">Yellow</label>
</p>
<p>
<input type="checkbox" class="filled-in item" id="filled-in-box" checked="checked" />
<label for="filled-in-box">Filled in</label>
</p>
<p>
<input type="checkbox" id="test7" checked="checked" disabled="disabled" class="item" />
<label for="test7">Green</label>
</p>
<p>
<input type="checkbox" id="test8" disabled="disabled" class="item" />
<label for="test8">Brown</label>
</p>
</form>$(function(){
$("#all").click(function () {
$('.item').attr('checked', this.checked);
});
});Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels