Revision: 31815
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at September 14, 2010 05:05 by Tate
Initial Code
$j('.default-value').each(function() { var default_value = this.value; $j(this).focus(function() { if(this.value == default_value) { this.value = ''; } }); $j(this).blur(function() { if(this.value == '') { this.value = default_value; } }); });
Initial URL
Initial Description
Need to add the class .default-value to the input
Initial Title
OnChange OnFocus Text Input with jQuery
Initial Tags
Initial Language
JavaScript