$passwordField = $('.your-selector');
attribites = {
id: $passwordField.attr('id'),
type: $passwordField.attr('type') === 'password' ? 'text' : 'password',
name: $passwordField.attr('name'),
value: $passwordField.attr('value'),
class: $passwordField.attr('class'),
};
$passwordField.replaceWith($('<input/>', attribites));
$resets = $('.downMenu').find('.reset');
$resets.toggleClass('some-class', $resets.length < 4);
searchInput.is(":visible")
.