Created
November 14, 2011 20:43
-
-
Save orhanveli/1365091 to your computer and use it in GitHub Desktop.
asp:checkbox check all checkboxes using jQuery
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
// Checks all individual checkboxes | |
$(".checkAreaAll").children("input").click(function () { | |
$(".checkArea").children("input").attr('checked', $(".checkAreaAll").children("input").is(':checked')); | |
}); | |
// unchecks the check all checkbox when one individual checkbox is unchecked | |
$(".checkArea").children("input").click(function () { | |
$(".checkAreaAll").children("input").attr('checked', false); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment