Toggle Password
Show or hide password field.
How to use
Copy-paste the following <script>
near the end of your pages under JS Implementing Plugins to enable it.
<script src="../assets/vendor/hs-toggle-password/dist/js/hs-toggle-password.js"></script>
Copy-paste the init function under JS Plugins Init., before the closing </body>
tag, to enable it.
<script>
$(document).on('ready', function () {
// initialization of Show Password
$('.js-toggle-password').each(function () {
new HSTogglePassword(this).init()
});
});
</script>
Examples
With checkbox
Show default
Multi toggle
Modal example
Methods
Parameters | Description | Default value |
---|---|---|
target
|
The element when clicked on which the password will be shown or hidden. |
null
|
classChangeTarget
|
The element when showing or hiding the password will be changed class. |
null
|
defaultClass
|
The class to be added by default to classChangeTarget . |
null
|
showClass
|
The class to be added when passowrd is show to classChangeTarget . |
null
|
show
|
Show password by default. |
false
|