WordPress.org

Support

Support » Plugins and Hacks » Sidebar Login » Placeholder Values

Placeholder Values

Viewing 4 replies - 1 through 4 (of 4 total)
  • Try to add this to your sidebar-login.js file:

    $(document).ready(function(){
      $('form').find('input[name="log"]').each(function(ev)
      {
          if(!$(this).val()) {
         $(this).attr("placeholder", "Username");
      }
      });
    });
    
    $(document).ready(function(){
      $('form').find('input[name="pwd"]').each(function(ev)
      {
          if(!$(this).val()) {
         $(this).attr("placeholder", "Password");
      }
      });
    });

    I’ve tried this but it didn’t work at all… Does it have any tricks?
    Thanks a lot!

    I just put the above code in my normal script file and it works .thanks Adam

    Hi Cawo88, in what normal script file did you put this and where? Thnx in advance!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Placeholder Values’ is closed to new replies.
Skip to toolbar