Return to Snippet

Revision: 21782
at December 21, 2009 03:58 by ReeceMarsland


Initial Code
var searchBox = $("#edit-search-theme-form-1");
var searchBoxDefault = "Enter keywords";
searchBox.attr("value", searchBoxDefault);
	
searchBox.focus(function(){  
  if(jQuery.trim($(this).attr("value")) == searchBoxDefault) $(this).attr("value", "");  
});  

searchBox.blur(function(){  
  if(jQuery.trim($(this).attr("value")) == "") $(this).attr("value", searchBoxDefault);  
})

Initial URL

                                

Initial Description

                                

Initial Title
jQuery Search Text Replace

Initial Tags
search, jquery

Initial Language
jQuery