Advertisement
Guest User

Untitled

a guest
Apr 17th, 2015
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.             $("input[type=text]").each(function () {
  2.                 if ($(this).val() == "") $(this).val($(this).attr('Name'));
  3.                 $(this).focus(function () {
  4.                     if ($(this).val() == $(this).attr('Name'))
  5.                         $(this).val('');
  6.                 });
  7.                 $(this).blur(function () {
  8.                     if ($(this).val() == "")
  9.                         $(this).val($(this).attr('Name'));
  10.                 });
  11.             })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement