JQuery – Set Attribute value

Some things before the actual code..

the hash (#) you use as the selector is for IDs and not for names of elements.
also the disabled attribute is not a true false scenario .. if it has disabled attribute it means that it is true .. you need to remove the attribute and not set it to false.
Also there are the form selectors that identify specific types of items in a form ..

so the code would be

$("input:checkbox[name="chk0"]").removeAttr('disabled');

Bringing the answer up-to-date

You should use the .prop() method (added since v1.6)

$("input:checkbox[name="chk0"]").prop('disabled', false); // to enable the checkbox

and

$("input:checkbox[name="chk0"]").prop('disabled', true); // to disable the checkbox

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)