Posted By

gerhardsletten on 11/03/09


Tagged

forms


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

smoothdzion


Toggle all checkboxes with jquery


 / Published in: jQuery
 

  1. <script>
  2.  
  3. jQuery(document).ready(function() {
  4. jQuery("#selectall").click(function()
  5. {
  6. var checked_status = this.checked;
  7. jQuery("input[type='checkbox']").each(function()
  8. {
  9. this.checked = checked_status;
  10. });
  11. });
  12. });
  13. </script>

Report this snippet  

You need to login to post a comment.