Posted By

jesudasjj on 10/20/11


Tagged

input remove Value focus


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

robfahy


on focus remove input value


 / Published in: jQuery
 

URL: http://buildinternet.com/2009/01/changing-form-input-styles-on-focus-with-jquery/

  1. $(document).ready(function() {
  2. $('.rmv-dft-val').click(
  3. function() {
  4. if (this.value == this.defaultValue) {
  5. this.value = '';
  6. }
  7. }
  8. );
  9. $('.rmv-dft-val').blur(
  10. function() {
  11. if (this.value == '') {
  12. this.value = this.defaultValue;
  13. }
  14. }
  15. );
  16. });

Report this snippet  

You need to login to post a comment.