I know this question has been asked multiple times, but there is no clear answer about it. I am trying to do some process (an ajax call) when the user is writing on an input. So I tried to use the onchange
event, but it does not seem to work. I can't understand why. Here' my code:
HTML:
<input type="text" required="" class="form-control" name="email" placeholder="Adresse email" id="email">
JS
$("#email").change(function() {
alert("here");
/**** Process ****/
});
And here is the fiddle : JSFiddle
I saw in other posts that one should not use the change event, but I can't find a clear answer about how to it correctly.