Return to Snippet

Revision: 28227
at July 4, 2010 17:57 by binshtok


Initial Code
jQuery(document).ready(function(){
  $("input, textarea").focus(function(){
    if ($(this).attr("value") == $(this).attr("title"))
      $(this).attr("value", "")
  });

  $("input, textarea").blur(function(){
    if ($(this).attr("value") == "")
      $(this).attr("value", $(this).attr("title"))
  });
});

Initial URL
http://habrahabr.ru/blogs/jquery/98010/

Initial Description

                                

Initial Title
Form default values

Initial Tags
form

Initial Language
jQuery