/ Published in: jQuery
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
$("#email") .val("Enter Your Email Here") .css("color", "#000") .focus(function(){ $(this).css("color", "#c1403e"); if ($(this).val() == "Enter Your Email Here") { $(this).val(""); } }) .blur(function(){ $(this).css("color", "#000"); if ($(this).val() == "") { $(this).val("Enter Your Email Here"); } });