Toggle Password Visibility – toggle-password.js

Category: Form , Javascript | May 1, 2020
Author:nauvalazhar
Views Total:448 views
Official Page:Go to website
Last Update:May 1, 2020
License:MIT

Preview:

Toggle Password Visibility – toggle-password.js

Description:

The toggle-password.js JavaScript library provides a possibility to toggle the visibility of your password strings with a custom element.

How to use it:

1. Download and load the toggle-password.js script at the end of the document.

<script src="toggle-password.js"></script>

2. Create a password visibility toggle element with the following data attributes.

  • data-toggle: selector of toggle element
  • data-target: selector of target password field
<input id="demo" type="password" name="password">
<a data-toggle="password" data-target="#demo">
  Toggle Password
</a>

You Might Be Interested In:


Leave a Reply