Revision: 46332
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at May 17, 2011 19:44 by dubogii
Initial Code
$('.default-value').each(function() { var default_value = this.value; $(this).focus(function(){ if(this.value == default_value) { this.value = ''; } }); $(this).blur(function(){ if(this.value == '') { this.value = default_value; } }); });
Initial URL
http://css-tricks.com/snippets/jquery/setclear-default-input-value/
Initial Description
Initial Title
Set/Clear Default Input Value
Initial Tags
Initial Language
jQuery