Skip to content

Instantly share code, notes, and snippets.

@mangantj
Created August 12, 2011 19:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mangantj/1142743 to your computer and use it in GitHub Desktop.
Save mangantj/1142743 to your computer and use it in GitHub Desktop.
function AttachCheckBoxListOnClickEvent(controlId) {
$("#" + controlId + " input").click(function () {
if ($(this).parent().find('input:checkbox:first').is(':checked')) {
if ($(this).is('checked') == false) {
$("#" + testStageCheckListControlId + " tbody td:first-child input:checkbox").removeAttr('checked');
}
else {
SelectAllCheckBoxes(controlId, true);
}
}
else {
SelectAllCheckBoxes(controlId, false);
}
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment