When I click the button, only the first checkbox event is being checked while the rest of them are not. Can someone please provide some guidance on how to fix this issue?
$("#cascadeChange").click(function() {
//alert("Clicked");
var isChkIp = $("#chkboxIP").is(":checked");
if (isChkIp) {
$("#IINTier1Ip").val($("#txtCascadeTier1").val()).change();
$("#IINTier2Ip").val($("#txtCascadeTier2").val()).change();
$(".txtIpOon").val($("#txtCascadeOon").val()).change();
$("#idCscade").modal('hide');
return true;
} else {
return false;
}
var isChkOp = $("#chkboxOp").is(":checked");
if (isChkOp) {
$("#IINTier1Op").val($("#txtCascadeTier1").val()).change();
$("#IINTier2Op").val($("#txtCascadeTier2").val()).change();
$(".txtCascadeOonOp").val($("#txtCascadeOon").val()).change();
$("#idCscade").modal('hide');
return true;
} else {
return false;
}
var isChkOpEr = $("#chkboxOpEr").is(":checked");
if (isChkOpEr) {
$("#IINTier1OpEr").val($("#txtCascadeTier1").val()).change();
$("#IINTier2OpEr").val($("#txtCascadeTier2").val()).change();
$("#OONOpEr").val($("#txtCascadeOon").val()).change();
return true;
} else {
return false;
}
return true
});