Check if checkbox is checked


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

Check if the checkbox is checked or not on button click


Copy this code and paste it in your HTML
  1. $('.msisdn-submit').click(function () {
  2. if (!$('input#field_terms').is(':checked')) {
  3. alert('not checked');
  4. return false;
  5. }
  6. });

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.