<input type="text" value="useraname" />
<input type="password" value="password" />
I'm using jQuery to make the inline labels disappear on click/focus. Password shows bulls as usual, but I wonder if its possible somehow to show "Password" label as text (instead of ••••) inside the password field?
Edited to add: I want the user-typed password to be hidden ofcourse!.
Thanks
why all that long script for? that jus a simple task which can be done with a half line of code :
cheers
I think you'd need to dynamically overlay an <input type="text"> on top of the password field to do this.
There are plugins for that. See labelify for example
If you make the input type="textbox" you'll be able to see the password.
My solution is close to what Dan provided above.
An alternative here would be to omit the "label" parameter, and just use the "title" value, which is basically what labelify.js does. You could add in the part of labelify that just applies these event handlers to all inputs of type text if you wanted. Or download labelify and add the below code where needed:
The only advantage my snippet has over labelify is that it includes the answer to your original question:
Check out the code below. Just append
addPassClear("Password")
to any input element that you want this functionality for.