I am trying to find specific input variables that I do append in my div
based on the user requests.
Once the input variables are created I need to validate the content in the input tags before I can proceed. But I am not able to find those variables in jQuery..
Any help is appreciated.
$("#txtNoOfAccounts").on("focusout", function () {
var count = parseInt($("#txtNoOfAccounts").val());
$("#lblSuccess").text(' ');
$("#lblError").text(' ');
if (count.toString() != "NaN") {
$("#accountDiv").empty();
for (var i = 0; i < count; i++) {
$("#accountDiv").append(
"<div class='divTableRow' style='width: 100%'>" +
"<div class='divTableCell' style='width: 40%;padding-left:0;'>" + "<input type='text' name='AccountNo_" + i.toString() + "'" + " class='txtAccountNo' /></div>" +
"<div class='divTableCell' style='width: 40%'>" + "<input type='text' name='Suffix_" + i.toString() + "'" + " class='txtSuffix' /></div>
</div>")
}
}
});
How do I find txtSuffix
input variables.
I tried:
$('.txtSuffix').focusout(function (e) {
alert("Control Found");
});
I am not able to find those variables with jQuery.
Any help is appreciated.