Simply clear the default input value on first :focus


/ Published in: jQuery
Save to your folder(s)



Copy this code and paste it in your HTML
  1. $("input[type='password'], input[type='text'], textarea").each(function(){
  2. $(this).one('focus',function(){
  3. $(this).val("");
  4. });
  5. });

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.