I have an password field and an small icon on right and I want to show the inputted password for 2 sec when user click on the icon. What I have done is.
$("#showpass").click(function(){
$('#pass').attr('type','text').delay(2000).attr('type','password');
);
It does nothing but when I only do $('#pass').attr('type','text')
it works without any issue.