Insert default value if input-text is deleted
- by Kim Andersen
Hi all
I have the following piece of jQuery code:
$(".SearchForm input:text").each(function(){
/* Sets the current value as the defaultvalue attribute */
if(allowedDefaults.indexOf($(this).val()) > 0 || $(this).val() == "")
{
$(this).attr("defaultvalue", $(this).val());
$(this).css("color","#9d9d9d");
…