Showing posts with label Enable/Disable button when checkbox clicked. Show all posts
Showing posts with label Enable/Disable button when checkbox clicked. Show all posts

Tuesday, June 27, 2017

Enable/Disable button when checkbox clicked

This can be easily achieved using jQuery as displayed below.

//bind this event in pageLoad or Dom Ready

$("#chkAgree").click(function(e) {
  $("#btnSave").attr("disabled", !this.checked);
});

Regards,
Samitha