1const opt = $('#select option:not(:disabled)'); // array with all options not disabled
2const first = $($('#select option:not(:disabled)')[0]); // first option not disabled
1$(document).ready(function(){
2 $(':checkbox.selectall').on('click', function(){
3 $(':checkbox[class='+ $(this).data('checkbox-name') + ']:not(:disabled)').prop("checked", $(this).prop("checked"));
4 $(':checkbox[class='+ $(this).data('checkbox-name') + ']:not(:disabled)').trigger("change");
5 });
6});