Search
 
SCRIPT & CODE EXAMPLE
 

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');
});
Comment

jquery show password

 $("#showpaswd").click(function () {
        var x = document.getElementById("cpassword");
        if (x.type === "password") {
            x.type = "text";
        } else {
            x.type = "password";
        }
    });
Comment

PREVIOUS NEXT
Code Example
Javascript :: eslint console log 
Javascript :: Appium press Enter on android with js 
Javascript :: jquery check if input is empty on submit 
Javascript :: timeout javascript 
Javascript :: path.split is not a function react hook use form 
Javascript :: jquery continue in loop each 
Javascript :: Could not resolve dependency error peer react@"^16.8.0 || ^17.0.0" from @material-ui/core@4.12.4 
Javascript :: get value of selected checkbox jquery 
Javascript :: jquery if checkbox checked 
Javascript :: check window resize javascript 
Javascript :: angular rebuild 
Javascript :: on window resize react 
Javascript :: items in center in native 
Javascript :: connect mongoose to atlas 
Javascript :: remove all numbers from string javascript 
Javascript :: how to submit using checkbox 
Javascript :: how to see if user clicked key in js 
Javascript :: update node-modules 
Javascript :: react scroll to bottom of div 
Javascript :: javascript get string between two characters 
Javascript :: json_decode jquery 
Javascript :: javascript calculate age given date string 
Javascript :: installing node on ec2 instance 
Javascript :: check if array javascript 
Javascript :: select2 get selected value 
Javascript :: how to check if file upload is empty jquery 
Javascript :: Delete icon Mui 
Javascript :: javascript add required attribute to input 
Javascript :: how to use session using javascript 
Javascript :: get iso date javascript 
ADD CONTENT
Topic
Content
Source link
Name
4+3 =