I have these 3 checkboxes
<td style="background-color: #D6FAFA"><input type="checkbox" name="box2" id="ok" /></td>
<td style="background-color: #D6FAFA"><input type="checkbox" name="box2" id="nok"/></td>
<td style="background-color: #D6FAFA"><input type="checkbox" name="box2" id="na"/></td>
When checking a checkbox with id = ok I can not mark the other two checkboxes and do the same thing with the other checkboxes, ie I'll only be able to check if I have everything unchecked if one of them has checked the others lock
I tried this did not work out
$(function() {
enable_cb();
$("#ok").click(enable_cb);
$("#nok").click(enable_cb);
$("#na").click(enable_cb);
});
function enable_cb() {
if (this.checked) {
$("#nok").attr("disabled",true);
$("#na").attr("disabled",true);
} else {
$("#nok").removeAttr("disabled");
$("#na").removeAttr("disabled");
}
}
Can anyone tell me what's wrong, I'm using the jquery.v1.9.1 library.