iam doing it so that it inside input field it should say "Password". then if user start type in than it should put chars ****.
html file
<input type="password" name="password" id="login_password" class="login_field" value=""/>
js file
/*** login page - password field ***/
var password = 'Password';
$('#login_password').replaceWith('<input type="text" value="" name="password" id="login_password" class="login_field">');
$('#login_password').css('color', 'gray');
$('#login_password').attr('value', password).focusin(function()
{
$(this).css('color', 'black');
if($(this).val() == password)
{
$(this).replaceWith('<input type="password" value="" name="password" id="login_password" class="login_field">');
$('#login_password').fousin();
}
}).focusout(function()
{
if($(this).val() == '')
{
$(this).attr('value', password);
}
});
not sure if this is the right way to do this task. there is also a small bug. when i foucs on input filed i have to click two times.