Skip to content

Instantly share code, notes, and snippets.

@timgaunt
Created March 25, 2013 06:54
Show Gist options
  • Save timgaunt/5235354 to your computer and use it in GitHub Desktop.
Save timgaunt/5235354 to your computer and use it in GitHub Desktop.
The easiest checkbox select all ever (jQuery) Original: http://briancray.com/posts/check-all-jquery-javascript
$(function () {
$('.checkall').on('click', function () {
$(this).closest('fieldset').find(':checkbox').prop('checked', this.checked);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment