I want to select all checkbox elements expect disabled ones,
checkbox
this is my html
I'd personally suggest:
$('#chkSelectAll').change(function(){ var self = this; $('input:checkbox').filter(function(){ return !this.disabled }).prop('checked',self.checked); });
JS Fiddle demo.
References: