I have two text fields which are pretty much the same. The only difference is that one has a name of "name" and the other a name of "surname".
I am trying to not use ID's but rather just "input" to trigger a loader when either has text inputted.
$(document).ready(function(){
$("input").keyup(function(){
if("input".length >3){
$(".loader").show();
}
});
});
Open in new window
The loader should only display after 3 characters are entered. With this code, the loader appears after typing only one character.
Secondly, how can I get the loader to show in the text box that has text being entered into it?
Open in new window