Created
April 2, 2020 22:54
-
-
Save progerio/041ecbc10b65a89267056941070c452c to your computer and use it in GitHub Desktop.
Jquery - check all input checkbox
This file contains hidden or 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
function checkAll(){ | |
$("#checkTodos").click(function(){ | |
$('input:checkbox').not(this).prop('checked', this.checked); | |
}); | |
} | |
document.ready(function(){ | |
checkAll(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment