Showing posts with label checkbox. Show all posts
Showing posts with label checkbox. Show all posts

Monday, 22 October 2018

jQuery CheckBox and Enable Button

Hi everyone.. below are the tutorial how to make jQuery CheckBox and Enable Button.
lets check it out!

1. HTML Code
<div>
  <label for="myCheckbox"><input id="myCheckbox" type="checkbox"/>I Agree</lable>
  <p>
  <button id="myButton" disabled>Submit</button>
</div>

2. JS Code
$(document).ready(function () {
  $('#myCheckbox').click(function () {
    $('#myButton').prop("disabled", !$("#myCheckbox").prop("checked")); 
  })
});

Please click the link for TUTORIAL

Sekian Terima Kasih.

----------------------------------------------------------
Disediakan Oleh : Zainimar Binti Zulkifli
Sumber :https://codepen.io/oomusou/pen/OMKZPZ