Untitled
public javascript v1 · immutable $('<input type="checkbox" class="select-all-checkbox form-checkbox" />').prependTo('th.select-all').click(function() { $('input:checkbox:not(.select-all-checkbox)', this.form).each(function() { this.checked = $('.select-all-checkbox')[0].checked; $(this).parents('tr').toggleClass('selected'); }); });