Advertisement
DrupalCustom

tbjs

Jan 23rd, 2012
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $(document).ready(function()
  2. {
  3.     $(".defaultText").focus(function(srcc)
  4.     {
  5.         if ($(this).val() == $(this)[0].title)
  6.         {
  7.             $(this).removeClass("defaultTextActive");
  8.             $(this).val("");
  9.         }
  10.     });
  11.    
  12.     $(".defaultText").blur(function()
  13.     {
  14.         if ($(this).val() == "")
  15.         {
  16.             $(this).addClass("defaultTextActive");
  17.             $(this).val($(this)[0].title);
  18.         }
  19.     });
  20.    
  21.     $(".defaultText").blur();        
  22. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement