I faced this issue because my selector was depend on id
meanwhile I did not set id for my element
my selector
was
$("#EmployeeName")
but my HTML element
<input type="text" name="EmployeeName">
so just make sure that your selector criteria are valid