Answers for "checkbox disabled using jquery"

1

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
0

jquery select all checkboxes except disabled

//html
  <input type="checkbox" id="checkboxAll" title="Select All" />
 //jquery
     $('#checkboxAll').change(function () {
            $('input:checkbox').filter(function () {
                return !this.disabled
            }).prop('checked', this.checked);
     });
Posted by: Guest on January-05-2022

Code answers related to "checkbox disabled using jquery"

Code answers related to "Javascript"

Browse Popular Code Answers by Language