Rob Bennet Interactive

  • Archive
  • RSS
  • Have a Question?
  • Submit

Default Value Clear

$(“#ELEMENT-ID”).focus(function() {

if( this.value == this.defaultValue ) {

this.value = “”;

}

}).blur(function() {

if( !this.value.length ) {

this.value = this.defaultValue;

}

    });

  • 10 months ago
  • Permalink
  • Share
    Tweet
← Previous • Next →

About

@rwbennet
  • RSS
  • Random
  • Archive
  • Have a Question?
  • Submit
  • Mobile

Effector Theme by Carlo Franco.

Powered by Tumblr