Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Simplest jQuery method for selecting all checkboxes in a form
$( '.selectall' ).click( function () {
$( this ).closest( 'form' ).find( ':checkbox' ).attr( 'checked' , this.checked );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.