Answers for "how to disable a checkbox in jquery"

2

jquery disable checkbox

$(function() {
  enable_cb();
  $("#group1").click(enable_cb);
});

function enable_cb() {
  if (this.checked) {
    $("input.group1").removeAttr("disabled");
  } else {
    $("input.group1").attr("disabled", true);
  }
}
Posted by: Guest on August-13-2020

Code answers related to "how to disable a checkbox in jquery"

Code answers related to "Javascript"

Browse Popular Code Answers by Language