Hi all I'm implementing the standard select all/none functionality for table rows and got this problem that i can't overcome. I use this code snippet to do selection:
$(selAll, tableSelector).toggle( function(e) { $('input[type=checkbox]', tableSelector).attr('checked', 'checked'); }, function() { $('input[type=checkbox]', tableSelector).removeAttr('checked'); } ); selAll is selector for checkbox that should select all/none checkboxes in table, tableSelector is... well... table selector. However i noticed that each time i click on selAll checkbox, it stays unchecked. Debugging on Firefox (using Firebug's debugger) shows that unchecking gets executed after the first toggle function is left (the checkbox gets checkedbefore the only line of code in that function). Any pointers are much appreciated!