jQuery Plugin To Show / Hide Passwords - PassPeek

jQuery Plugin To Show / Hide Passwords - PassPeek
File Size: 4.61 KB
Views Total:
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   

PassPeek is a jQuery plugin that automatically generate a toggle link next to the password field that allows the users to easily hide and show the characters in their passwords. Useful for mobile web applications where the chances of entering your password incorrectly is more likely to happen.

See also:

How to use it:

1. You first need to include the jQuery PassPeek plugin after jQuery JavaScript library.

<script src="//code.jquery.com/jquery-1.11.3.min.js"></script>
<script src="pass-peek.js"></script>

2. And then call the function on the password field. That's it.

$(':password').passPeek();

3. By default, the plugin is set to 'strict' mode which means the password toggle functionality will be disabled if protocol is not HTTPS. You can turn off the 'strict' mode during initialization as follow.

$(':password').passPeek({strict: true});

4. More configuration options.

$(':password').passPeek({

  // text labels for show / hide links
  labels: ['Show', 'Hide'],

  // position of the labels
  labelPosition: 'after'

});

This awesome jQuery plugin is developed by andfisher. For more Advanced Usages, please check the demo page or visit the official website.