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

view my password jquery

$('#check').click(function(){
	if(document.getElementById('check').checked) {
    $('#test-input').get(0).type = 'text';
  } else {
      $('#test-input').get(0).type = 'password';
  }
});

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<input type='password' id='test-input' /> Show password <input type='checkbox' id='check' />
Comment

PREVIOUS NEXT
Code Example
Javascript :: how to use useparams in react 
Javascript :: javascript round to 8 decimal places 
Javascript :: find inside iframe jquery 
Javascript :: reactjs install 
Javascript :: is a letter javascript 
Javascript :: remove item from array by value 
Javascript :: es6 array sum javascript 
Javascript :: json vs gson 
Javascript :: mv multiple directories 
Javascript :: how to get number of a specific element of an array 
Javascript :: pipe data to json angular 
Javascript :: app.use bodyparser 
Javascript :: json placholder 
Javascript :: document.getElementById(...).getContext is not a function 
Javascript :: react router active link 
Javascript :: authentication in strapi 
Javascript :: unique element in array 
Javascript :: jquery if class clicked 
Javascript :: js make id 
Javascript :: shadow react native 
Javascript :: quasar apexchart 
Javascript :: get the data from selected item in select 
Javascript :: javascript join object properties in array 
Javascript :: for of js 
Javascript :: open sans font react js 
Javascript :: delete element in hash in javascript 
Javascript :: get all indexes for element in array javascript 
Javascript :: ajaxcomplete jquery example 
Javascript :: node main 
Javascript :: import image as component react 
ADD CONTENT
Topic
Content
Source link
Name
7+5 =