Hide form value - jQuery


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



Copy this code and paste it in your HTML
  1. $("#email")
  2. .val("Enter Your Email Here")
  3. .css("color", "#000")
  4. .focus(function(){
  5. $(this).css("color", "#c1403e");
  6. if ($(this).val() == "Enter Your Email Here") {
  7. $(this).val("");
  8. }
  9. })
  10. .blur(function(){
  11. $(this).css("color", "#000");
  12. if ($(this).val() == "") {
  13. $(this).val("Enter Your Email Here");
  14. }
  15. });

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.