I made a working Fiddle for you HERE
HTML :
<form class="left push-bottom-px10 width-match-parent">
<input type="text" id="email" value="email"/>
<input type="text" id="password" value="password"/>
</form>
JQUERY :
$(document).ready(function() {
$('#email').bind('focus', function() {
var currentValue = $.trim($(this).val());
if(currentValue == 'email') $(this).val('');
});
$('#email').bind('blur', function() {
var currentValue = $.trim($(this).val());
if(currentValue == '') $(this).val('email');
});
$('#password').bind('focus', function() {
var currentValue = $.trim($(this).val());
if(currentValue == 'password') {
$(this).val('');
$(this).attr('type', 'password');
}
});
$('#password').bind('blur', function() {
var currentValue = $.trim($(this).val());
if(currentValue == '') {
$(this).val('password');
$(this).attr('type', 'text');
}
});
});
EDIT
Because of IE security on change type property, this way doesn't work... You can do a fakepassword to hide when user want to enter her password. Like this FIDDLE
HTML :
<form class="left push-bottom-px10 width-match-parent">
<input type="text" id="email" value="email"/>
<input type="text" id="fakepassword" value="password"/>
<input type="password" id="password" value=""/>
</form>
JQUERY :
$(document).ready(function() {
$('#password').hide();
$('#email').bind('focus', function() {
var currentValue = $.trim($(this).val());
if(currentValue == 'email') $(this).val('');
});
$('#email').bind('blur', function() {
var currentValue = $.trim($(this).val());
if(currentValue == '') $(this).val('email');
});
$('#fakepassword').bind('focus', function() {
$('#fakepassword').hide();
$('#password').show().focus();
});
$('#password').bind('blur', function() {
var currentValue = $.trim($(this).val());
if(currentValue == '') {
$('#fakepassword').show();
$('#password').hide();
}
});
});