Posted By

mgasparotto on 06/03/10


textmate jquery checkbox

Versions (?)

Who likes this?

1 person have marked this snippet as a favorite


How to toggle all checkbox on a page

 / Published in: jQuery

  1. //---- How to Toggle All the checkboxes on a page
  2. var tog = false; // or true if they are checked on load
  3. $('a').click(function() {
  4. $("input[type=checkbox]").attr("checked",!tog);
  5. tog = !tog;
  6. });

Report this snippet  

You need to login to post a comment.