I want to select all checkbox
elements expect disabled ones,
this is my html
$('#chkSelectAll').click(function () {
var checked_status = this.checked;
$('div#item input[type=checkbox]').each(function () {
if (!this.disabled)
this.checked = checked_status;
});
});
or without the each loop :
$('#chkSelectAll').on('click', function() {
var checked_status = this.checked;
$('div#item input[type=checkbox]').prop('checked', function(i, prop) {
return this.disabled ? prop : checked_status;
});
});