Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
JS - toggle encrypted password
var togglePasswordText = function(){
var $showBtn = $('.js-show-password');
var $pw = $('.js-password-toshow');
$showBtn.on('click', function(){
if ( $pw.get(0).type === "password" ){
$pw.get(0).type = 'text';
$pw.get(0).type = 'password';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.