I have an input type password that I want to change to text when an immage is clicked.
This is what I did:
$('#txtGenerate').attr("type", "text");
But it's not working.. What can I do?
I have an input type password that I want to change to text when an immage is clicked.
This is what I did:
$('#txtGenerate').attr("type", "text");
But it's not working.. What can I do?
Use prop instead:
$('#txtGenerate').removeAttr("type");
$('#txtGenerate').prop('type', 'password');