Created
May 7, 2021 12:46
-
-
Save Rameshwar-ghodke/20286e5ae6bc4923f65ac9000328fa81 to your computer and use it in GitHub Desktop.
Password hide show using eye icon for passowrd field, use jquery
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
<i toggle="#password-field" class='view_pswd fa fa-eye-slash'></i> | |
$("body").on('click','.view_pswd',function(){ | |
$(this).toggleClass("fa-eye fa-eye-slash"); | |
var input = $("#password"); | |
input.attr('type') === 'password' ? input.attr('type','text') : input.attr('type','password') | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment