Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

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);
  }
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #jquery #disable #checkbox
ADD COMMENT
Topic
Name
9+7 =