Created
December 3, 2016 23:13
-
-
Save igorsgm/940b6ed743211acda3994d7a63629efa to your computer and use it in GitHub Desktop.
Ao clickar no checkbox #check_all irá marcar todos os checkboxes da table mais próxima
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Ao clickar no checkbox #check_all irá marcar todos os checkboxes da table mais próxima | |
*/ | |
js(document).on('click', '#check_all', function (e) { | |
var table = js(e.target).closest('table'); | |
js('td input:checkbox', table).prop('checked', this.checked); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment