I am using the following script to select all checkboxes with a given class.
$(document).ready(function(){ // 1
// 2
$(\':checkbox.selectall\').on(\'
Here is what I usually do:
$(function(){
$(".selectall").live('change', function(){
if($(this).is(":checked"))
{
$("input:checkbox:not(:disabled)." + $(this).data('checkbox-name')).prop("checked", "true");
}
else
{
$("input:checkbox:not(:disabled)." + $(this).data('checkbox-name')).prop("checked", "false");
}
});
});
I hope it helps :)