jQuery(document).on("change", ".chkMainModules", function()
{
var chkMain = $(this).val();
var MainCheckBox = $(this);
$('input[class="chkSubModules"]').each(function(e)
{
var chkSub = $(this).attr("id");
if (chkSub == chkMain)
{
if (MainCheckBox.is(':checked'))
{
$(this).prop("checked", true);
}
else
{
$(this).prop("checked", false);
}
}
});
});In this code we will learn about One Checkbox Check at a Time another Checkboxes Checked JQuery.
