checkbox management with jquery


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



Copy this code and paste it in your HTML
  1. // Read
  2. $('input[name=foo]').is(':checked')
  3. $('input[name=foo]').attr('checked')
  4.  
  5. // Set
  6. $('input[name=foo]').attr('checked', true); // checked
  7. $('input[name=foo]').attr('checked', false); // unchecked

URL: http://www.electrictoolbox.com/check-uncheck-checkbox-jquery/

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.