How do I modify the jquery to use the var instead of the '12'?
var disableId = 12;
if (e.currentTarget.checked) {
$("input:checkbox[value=12]").attr("disabled", true);
}
else {
$("input:checkbox[value=12]").attr("disabled", false);
}
ifstatement you're using is unnecessary as you can simply pass ine.currentTarget.checkedin place oftrueorfalse. You should also useprop()instead ofattr().