Possible Duplicate:
changing password field to text with checkbox with jquery
The code is supposed to check if a checkbox is checked, then change a password field from password to regular text and vice versa.
$('#cpassword_lf').change(function(){
if($('#cpassword_lf').is(':checked'))
{
$('#password_loginform').attr('type', 'text');
}
else
{
$('#password_loginform').attr('type', 'password');
}
});