Checkbox enable/disable submit


/ Published in: jQuery
Save to your folder(s)



Copy this code and paste it in your HTML
  1. <script language="javascript" type="text/javascript">
  2. $(document).ready(function ()
  3. {
  4. var Checkbox = $("#deleteDomain input[name='confirm']");
  5. var submit = $("#deleteDomain :submit");
  6.  
  7. Checkbox.bind('keyup click', function ()
  8. {
  9. $(this).is(':checked') ? submit.removeAttr('disabled') : submit.attr('disabled', 'disabled');
  10. });
  11. });
  12. </script>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.