show password on click button jquery

Solutions on MaxInterview for show password on click button jquery by the best coders in the world

showing results for - "show password on click button jquery"
Ayman
02 Mar 2020
1
2<div class="signin-form u-password p-relative">
3    <span class="view-password"><i class="fas fa-eye"></i></span>
4	<input id="pass" class="pass" type="password" placeholder="Enter your password"/>
5</div>
6
7$('.view-password').on('click', function () {
8  let input = $(this).parent().find(".pass");
9  input.attr('type', input.attr('type') === 'password' ? 'text' : 'password');
10});
Emily
10 Feb 2020
1 $("#showpaswd").click(function () {
2        var x = document.getElementById("cpassword");
3        if (x.type === "password") {
4            x.type = "text";
5        } else {
6            x.type = "password";
7        }
8    });