Skip to content

Instantly share code, notes, and snippets.

@nigelheap
Created April 21, 2011 00:25
Show Gist options
  • Save nigelheap/933402 to your computer and use it in GitHub Desktop.
Save nigelheap/933402 to your computer and use it in GitHub Desktop.
jQuery(".clear_return").focus(function() {
if( this.value == this.defaultValue ) {
this.value = "";
}
}).blur(function() {
if( !this.value.length ) {
this.value = this.defaultValue;
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment