Toggle all checkboxes with jquery


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



Copy this code and paste it in your HTML
  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


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.