Posted By

coryschadt on 03/20/11


Tagged

jquery


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

jillella


Hide form value - jQuery


 / Published in: jQuery
 

  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  

You need to login to post a comment.