$('#btnSelectAll').click(function() {
$('.inputchbox').attr('checked', true);
});
$('#btnCancel').click(function() {
$('fieldset:not(:checked)').find("input,select,textarea").removeAttr('disabled');
});
On cancel I need to enable only the checkboxes which are checked? Can I use something like this?
On selectall button I am selecting all the checkboxes from my fieldset but here I need to select only the enabled checkboxes and the not disabled checkboxes.. So checkboxes are disabled on my fieldset on the load it self?
How to exclude disabled checkboxes?
You can use the (':checkbox:enabled') selector to select only enabled checkboxes.
More info on :checked and :enabled
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With