jQuery Password Generator Plugin pGenerator - Download jQuery Password Generator Plugin - pGenerator

Download jQuery Password Generator Plugin – pGenerator

Posted on

This time I will share jQuery Plugin and tutorial about jQuery Password Generator Plugin – pGenerator, hope it will help you in programming stack.

jQuery Password Generator Plugin pGenerator - Download jQuery Password Generator Plugin - pGenerator
File Size: 5.98 KB
Views Total: 2543
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   

pGenerator is a jQuery plugin that helps you create a Password Generator for your accounts forms that generates a secure password and display it to your user.

Basic Usage:

1. Include jQuery library and pGenerator.js in the head section

2 <script src="pGenerator.jquery.js"></script>

2. Markup

1 <input type="password" id="my-input-element" />
2 <a href="#" id="demo">Generate a password</a>
3 <!--Display the new generated password;-->
4 <div id="my-display-element"></div>

3. Call the plugin with options

01 $('#demo').pGenerator({
02  
03   // Bind an event to #myLink which generate a new password when raised;
04   'bind': 'click',
05  
06   // Selector for the form input which will contain the new generated password;
07   'passwordElement': '#my-input-element',
08  
09   // Selector which will display the new generated password;
10   'displayElement': '#my-display-element',
11  
12   // Length of the generated password.
13   'passwordLength': 16,
14  
15   // Password will contain uppercase letters;
16   'uppercase': true,
17  
18   // Password will contain lowercase letters;
19   'lowercase': true,
20  
21   // Password will contain numerical characters;
22   'numbers':   true,
23  
24   // Password will contain numerical characters;
25   'specialChars': true,
26  
27   // Extra special chars
28   'additionalSpecialChars': [],
29  
30   // Callback function which will be called each time a new password is generated;
31   'onPasswordGenerated': function(generatedPassword) {
32     alert('My new generated password is ' + generatedPassword);
33   }
34    
35 });

Change log:

2017-03-15

  • The plugin now supports adding extra special chars using the additionalSpecialChars new setting.

v1.0.2 (2013-09-11)

  • bugs fixed

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

source : jqueryscript.net