[jQuery] Re: Toggle all checkboxes, best way?

2007-10-30 Thread polskaya
This is a nice plugin to handle checkboxes, I think: http://www.texotela.co.uk/code/jquery/checkboxes/

[jQuery] Re: Toggle all checkboxes, best way?

2007-10-30 Thread Josh Nathanson
OK, this is tested and works -- don't know why I thought .each was needed. var tog = false; // or true if they are checked on load $('a').click(function() { $("input[type=checkbox]").attr("checked",!tog); tog = !tog; }); -- Josh - Original Message - From: Andy Matthews To

[jQuery] Re: Toggle all checkboxes, best way?

2007-10-30 Thread James Dempster
I would suggest a couple of changes var $checkboxes = $('input[type=checkbox]'); $('a').toggle(function() { $checkboxes.attr('checked','checked'); return false; }, function() { $checkboxes.removeAttr('checked'); return false; }); p.s. do you really need to post a 6K dealerskinslogo.bmp,

[jQuery] Re: Toggle all checkboxes, best way?

2007-10-30 Thread Josh Nathanson
Maybe something like this...not tested var tog = false; $('a').click(function() { $('input[type=checkbox]').each(function() { $(this).attr('checked',!tog); // not sure if you need removeAttr for checkboxes }); tog=!tog; }); -- Josh - Original Message - From: And

[jQuery] Re: toggle all

2007-08-17 Thread Alexandre Magno Teles Zimerer
Yeah, you can use each to iterate to divs that you want to close...> Date: Fri, 17 Aug 2007 11:24:36 -0400> From: [EMAIL PROTECTED]> To: jquery-en@googlegroups.com> Subject: [jQuery] toggle all> > > Hello, is it possible to toggle all once a new toggle has been made?> > I have this function> >