rem: checkboxes.each(function() { this.checked = selectAll[0].checked;  $(this).parents('tr:first')[ this.checked ? 'addClass' : 'removeClass' ]('selected'); }); 
add: $('th.select-all', table).prepend($('<input type="checkbox" class="form-checkbox" />').attr('title', strings.selectAll)).click(function(event) { if ($(event.target).is('input:checkbox')) {  checkboxes.each(function() { this.checked = event.target.checked;  $(this).parents('tr:first')[ this.checked ? 'addClass' : 'removeClass' ]('selected'); });  updateSelectAll(event.target.checked); } }); 
context:     checkboxes.each(function() {      this.checked = selectAll[0].checked;      // Either add or remove the selected class based on the state of the check all checkbox.      $(this).parents('tr:first')[ this.checked ? 'addClass' : 'removeClass' ]('selected');    });
meta: 3650	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/3650/940b059010a9f391195ea7f73bdabe81eb542328/tableselect.js/buggy/misc/tableselect.js