Created
December 16, 2009 15:09
-
-
Save nicolasblanco/257887 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function(){ | |
$('#password-clear').show(); | |
$('#password-password').hide(); | |
$('#password-clear').focus(function() { | |
$('#password-clear').hide(); | |
$('#password-password').show(); | |
$('#password-password').focus(); | |
}); | |
$('#password-password').blur(function() { | |
if($('#password-password').val() == '') { | |
$('#password-clear').show(); | |
$('#password-password').hide(); | |
} | |
}); | |
$('.default-value').each(function() { | |
var default_value = this.value; | |
$(this).focus(function() { | |
if(this.value == default_value) { | |
this.value = ''; | |
} | |
}); | |
$(this).blur(function() { | |
if(this.value == '') { | |
this.value = default_value; | |
} | |
}); | |
}); | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment