I am trying to deactivate a checkbox when I select another checkbox and activate it again when I unselect the other checkbox.
I have made this snippet:
$(document).ready(function(){
$('#inputManholeStrDist1').click(function(){
$("#inputManhole_LC_Dist").prop("disabled", !this.checked);
});
});
But it works in reverse. When I initially click the checkbox nothing happens and when I unclick it then the other checkbox gets disabled. What am I missing here?
Aucun commentaire:
Enregistrer un commentaire