[jQuery] Toggle all checkboxes, best way?

2007-10-30 Thread Andy Matthews
I've got some code which I think is pretty simple. But I'd like to see if there's a quicker (less code) way to do this. I simply want to be able to toggle all checkboxes on a page on/off. Is there a better way? var $checkboxes = $('input[type=checkbox]'); $('a').toggle(function(){ // toggl

[jQuery] toggle all

2007-08-17 Thread Anthony Leboeuf(Worcester Wide Web)
Hello, is it possible to toggle all once a new toggle has been made? I have this function function opendiv(div){ var show = div; $(show).slideToggle("slow"); } But I want to add something before the $(show).slideToggle("slow"); that closes all opened toggles. Is this possible? Thanks -T