/ Published in: jQuery
Selects all checkboxes and checks or unchecks them.
#chk_All = id(s) of the check box to add an onclick event for
#chk_All = id(s) of the check box to add an onclick event for
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
$(document).ready(function(){ $("#chk_All").click(function() { var checked_status = this.checked; $("input[type='checkbox']").each(function() { this.checked = checked_status; }); }); });