Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

show password on click button jquery


<div class="signin-form u-password p-relative">
    <span class="view-password"><i class="fas fa-eye"></i></span>
	<input id="pass" class="pass" type="password" placeholder="Enter your password"/>
</div>

$('.view-password').on('click', function () {
  let input = $(this).parent().find(".pass");
  input.attr('type', input.attr('type') === 'password' ? 'text' : 'password');
});
 
PREVIOUS NEXT
Tagged: #show #password #click #button #jquery
ADD COMMENT
Topic
Name
6+5 =