Tutorial Clear Default Search String on Focus

$("#s") .val("Search...") .css("color", "#ccc") .focus(function(){ $(this).css(...

$("#s")
.val("Search...")
.css("color", "#ccc")
.focus(function(){
$(this).css("color", "black");
if ($(this).val() == "Search...") {
$(this).val("");
}
})
.blur(function(){
$(this).css("color", "#ccc");
if ($(this).val() == "") {
$(this).val("Search...");
}
});

Set value of field to "

Hot in Week

Popular

Archive

item