Skip to content

Instantly share code, notes, and snippets.

@billrobbins
Created December 14, 2011 20:14
Show Gist options
  • Save billrobbins/1478287 to your computer and use it in GitHub Desktop.
Save billrobbins/1478287 to your computer and use it in GitHub Desktop.
Clear Gravity Forms Fields
$(document).ready(function() {
$.fn.cleardefault = function() {
return this.focus(function() {
if( this.value == this.defaultValue ) {
this.value = "";
}
}).blur(function() {
if( !this.value.length ) {
this.value = this.defaultValue;
}
});
};
$(".clearit input, .clearit textarea").cleardefault();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment