You can do it like this:
$("#checkBoxID").click(function() {
$("#buttonID").attr("disabled", !this.checked);
});
$("#yourcheckboxid").click(function() { var checked_status = this.checked; if (checked_status == true) { $("#yourbuttonid").removeAttr("disabled"); } else { $("#yourbuttonid").attr("disabled", "disabled"); } });
No comments:
Post a Comment