Posted By

jesudasjj on 11/17/11


Tagged

form css focus


Versions (?)

on focus remove default value and "itl" class


 / Published in: CSS
 

  1. $('.removeVal').live("click focus", function() {
  2. if (this.value == this.defaultValue) { this.value = ''; $(this).removeClass("itl"); }
  3. });
  4. $('.removeVal').live("blur", function() {
  5. if (this.value == '' || this.value == this.defaultValue) { this.value = this.defaultValue; $(this).addClass("itl"); }
  6. });

Report this snippet  

You need to login to post a comment.