Posted By

sveggiani on 09/29/09


Tagged

jquery not-mine


Versions (?)

checkbox management with jquery


 / Published in: JavaScript
 

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

  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

Report this snippet  

You need to login to post a comment.