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\'
Your code throws an error for me, type property can't be changed. Interestingly though, the following code does work for me on Chrome at least:
$('input#id_reg_pass')[0].type = 'password';
It could be that this doesn't work cross-browser however, which would explain why jQuery doesn't allow it (As pointed out by Niklas, this is the case). Alternatively you could construct a new with the same attributes and replace the old one with it.