jQuery Checkboxes Again


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



Copy this code and paste it in your HTML
  1. // First way
  2. $('#checkBox').attr('checked');
  3.  
  4. // Second way
  5. $('#edit-checkbox-id').is(':checked');
  6.  
  7. // Third way
  8. $("input[@type=checkbox][@checked]").each(
  9. function() {
  10. // Insert code here
  11. }
  12. );
  13. Returns true or false.

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.