Skip to content

Instantly share code, notes, and snippets.

@Xaz16
Created November 23, 2016 14:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Xaz16/8006f9c86cfe13e8acc662f13757cf17 to your computer and use it in GitHub Desktop.
Save Xaz16/8006f9c86cfe13e8acc662f13757cf17 to your computer and use it in GitHub Desktop.
Show/hide pass from input
$('.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