i wrote you a litte example
css
.placeholder {color:#aaa;}
input[type=text],
input[type=password] {
background:#eee;
}
input[type=text]:focus,
input[type=password]:focus {
background:#fff;
}
js
$("#username").focus(function(){
if($(this).val() == "Benutzername")
{
$(this).val("");
$(this).removeClass('placeholder');
}
});
$("#username").blur(function(){
if($(this).val() == "")
{
$(this).val("Benutzername");
$(this).addClass('placeholder');
}
});
$("#password").focus(function(){
if($(this).val() == "Passwort")
{
$(this).val("");
$(this).prop("type", "password");
$(this).removeClass('placeholder');
}
});
$("#password").blur(function(){
if($(this).val() == "")
{
$(this).val("Passwort");
$(this).prop("type", "text");
$(this).addClass('placeholder');
}
});
html
<input id="username" type="text" class="placeholder" value="Benutzername" /><br />
<input id="password" type="text" class="placeholder" value="Passwort" />
Check it out in JSFiddle
http://jsfiddle.net/hk8k4vew/