I am using the following script to select all checkboxes with a given class.
$(document).ready(function(){ // 1
// 2
$(\':checkbox.selectall\').on(\'
This does not do the same as your original code. It would only trigger change for those that was not changed. I've assummed you wished to trigger change for all the once you changed
$(':checkbox.selectall').on('click', function(){
$(':checkbox .'+ $(this).data('checkbox-name')).not(':disabled').prop("checked", $(this).prop("checked")).trigger("change");
});