A couple quick lines of jQuery allows you to free up real estate on your site (useful for mobile layouts) and add some interactivity at the same time:

The jQuery

$('#account-email, #account-password').focus(function() {
  if($(this).val() in {'email' : '', 'password' : ''})
    $(this).val('');
});

The HTML

<form action="" method="post">
  <input type="email" id="account-email" name="email" value="email" />
  <input type="text" id="account-password" name="password" value="password" />
</form>

Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *