Trying to change input type attribute from password to text.
$('.form').find('input:password').attr({type:"text"});
Why this doesn’t work?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can’t do this with jQuery, it explicitly forbids it because IE doesn’t support it (check your console you’ll see an error.
You have to remove the input and create a new one if that’s what you’re after, for example:
You can give it a try here
To be clear on the restriction, jQuery will not allow changing
typeon a<button>or<input>so the behavior is cross-browser consistent (since IE doens’t allow it, they decided it’s disallowed everywhere). When trying you’ll get this error in the console: