I am trying to change type of input, specifically after click into input change type=\"text\" to change=\"password\".
I don\'t know why, but I can\'
I had exactly the same problem, I wanted to show a text in a password field until the user clicked over it. I did another approach, instead to try to change the type of the field I hide it and showed a new text field, then called the focus(). It works fine.
$("#password_fake").focus(){
$(this).hide();
$("#password").show().focus();
}
where #password_fake is a text field and #password a password field with style="display:none".