Return to Snippet

Revision: 27362
at June 3, 2010 09:36 by mgasparotto


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

Revision: 27361
at June 3, 2010 09:32 by mgasparotto


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

Initial URL


Initial Description


Initial Title
How to toggle all checkbox on a page

Initial Tags
textmate, jquery

Initial Language
jQuery