Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $("#check_your_password").change( function() {
- var $input = $('input.show_pwd');
- var change = $(this).is(":checked") ? "text" : "password";
- var rep = $("<input type='" + change + "' />")
- .attr("id", $input.attr("id"))
- .attr("name", $input.attr("name"))
- .attr('class', $input.attr('class'))
- .val($input.val())
- .insertBefore($input);
- $input.remove();
- $input = rep;
- });
- /*
- <input type='password' id='check_your_password' />
- */
Add Comment
Please, Sign In to add comment