/ Published in: jQuery
![](/img/icon_sav.png?v3)
Great short snippet of code to toggle checkboxes.
Thanks [Josh Nathanson](http://groups.google.com/groups/profile?enc_user=aAOlJRcAAAC7dB8ku2NsRGdjbPtXhPEXHqZiDvCVswhrZ6TQxKj0ww) for putting this simple code together.
Thanks [Josh Nathanson](http://groups.google.com/groups/profile?enc_user=aAOlJRcAAAC7dB8ku2NsRGdjbPtXhPEXHqZiDvCVswhrZ6TQxKj0ww) for putting this simple code together.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
var tog = false; // or true if they are checked on load $('a').click(function() { $("input[type=checkbox]").attr("checked",!tog); tog = !tog; });
URL: http://groups.google.com/group/jquery-en/browse_thread/thread/ded7aae58024220b
Comments
![RSS Feed for Comments RSS Icon](/images/rss.png?v3)