Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save Rameshwar-ghodke/20286e5ae6bc4923f65ac9000328fa81 to your computer and use it in GitHub Desktop.
Save Rameshwar-ghodke/20286e5ae6bc4923f65ac9000328fa81 to your computer and use it in GitHub Desktop.
Password hide show using eye icon for passowrd field, use jquery
<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