Created
November 23, 2016 14:54
-
-
Save Xaz16/8006f9c86cfe13e8acc662f13757cf17 to your computer and use it in GitHub Desktop.
Show/hide pass from input
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('.show-pass').on('click', function() { | |
($(this).siblings('input').attr('type') == 'text') ? | |
$(this).siblings('input[type="text"]').attr('type', 'password') : | |
$(this).siblings('input[type="password"]').attr('type', 'text'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment