/ Published in: jQuery
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
$(document).ready(function() { $('.rmv-dft-val').click( function() { if (this.value == this.defaultValue) { this.value = ''; } } ); $('.rmv-dft-val').blur( function() { if (this.value == '') { this.value = this.defaultValue; } } ); });
URL: http://buildinternet.com/2009/01/changing-form-input-styles-on-focus-with-jquery/