I have a jquery Function in which i have declare a variable and make it default false.and then in the in the If condition i am assigning true value to that variable.But i am always getting false..why is so?? When used alert i am getting 'true' butin the if condition it is 'false'
Here is my Code:
var abc = false
$('#dataTable tr td').find("input[name='" + 'lstDetlIssue[' + i + '].Product' + "']").change(function () {
abc = true;
alert(abc);
});
if (MstCopyParseData[rowIndex].ProductID == MstCopyParseData[parseInt(i)].ProductID && (i != rowIndex && (MstCopyParseData[i].Product != "" && abc == true ))) {