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(){ // toggle me on $checkboxes.each(function(){ $(this).attr('checked','checked'); }); return false; },function(){ $checkboxes.each(function(){ $(this).removeAttr('checked'); }); }); ____________________________________ Andy Matthews Senior ColdFusion Developer
Office: 877.707.5467 x747 Direct: 615.627.9747 Fax: 615.467.6249 [EMAIL PROTECTED] www.dealerskins.com <http://www.dealerskins.com/>
<<dealerskinslogo.bmp>>