I have the below syntax which unchecks a checkbox.
$('#h12_1').attr('checked','checked');
h12_1 is the name of my checkbox.
How do I disable the checkbox so it cannot be checked? similarly how do I enable the checkbox again?
Something like this:
$.post('get_as_12', {data:selectedObj.value},function(result) {
alert(result[0]) ;
if(result[0] > 0) {
$('#h12_1').attr('checked','enabled');
$('#h12_1').attr('checked','checked');
} else {
$('#h15_1').attr('disabled');
$('#h15_1').removeAttr('checked');
}
});