I have problem dealing with unchecking all checkboxes. When I click on a toggle all checkbox, it could check all checkboxes. But if I uncheck the toggle all checkbox, nothin
You can do this with jQuery very easy and more understandable :)
$('#mybutton').click(function(e) { $('.myCheckboxes').each(function(i,item){ $(item).attr('checked', !$(item).is(':checked')); }); });
Try on jsFiddle