This is a nice plugin to handle checkboxes, I think:
http://www.texotela.co.uk/code/jquery/checkboxes/
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
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,
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
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> >
5 matches
Mail list logo