Skip to content

Instantly share code, notes, and snippets.

@mark-d-holmberg
Created January 30, 2013 00:14
Show Gist options
  • Save mark-d-holmberg/4669348 to your computer and use it in GitHub Desktop.
Save mark-d-holmberg/4669348 to your computer and use it in GitHub Desktop.
jquery check all
jQuery ->
$("input#select-all-reports").live "click", (e) ->
if $(this).is(':checked')
$("input.selected-reports:not(:checked)").each ->
$(this).attr('checked','checked')
else
$("input.selected-reports:checked").each ->
$(this).removeAttr('checked');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment