Return to Snippet

Revision: 30081
at August 7, 2010 04:59 by tcelestino


Initial Code
$(document).ready(function() {

   $("input[type='text']").focus(function() {
      if($(this).val() == 'here your text')
      $(this).val("");
   });

  $("input[type='text']").blur(function() {
      if($(this).val() == "")
      $(this).val("here your text");
   });


});

Initial URL
http://tcelestino.com.br

Initial Description


Initial Title
Using focus and blur on input with jQuery

Initial Tags
form, jquery

Initial Language
jQuery