Reputation:
I have a small jquery code which hide/show an icon when an input field is empty/have something My code is:
$("#pass1").on("change",function(){
if($("#pass1").val())
$("#showpass").show();
else
$("#showpass").hide();
});
But this occures only when user finish typing and moves to next field or removes focus but I want to do this while user is typing i.e it should occur as soon as user either enters or delete an single character.How can I do this ?
Upvotes: 1
Views: 816