An open API service indexing awesome lists of open source software.

https://github.com/aduth/jquery.passwordmask

jquery.passwordMask is a jQuery plugin to allow users the ability to toggle password masking
https://github.com/aduth/jquery.passwordmask

Last synced: 11 months ago
JSON representation

jquery.passwordMask is a jQuery plugin to allow users the ability to toggle password masking

Awesome Lists containing this project

README

          

# jquery.passwordMask

__jquery.passwordMask__ is a jQuery plugin to allow users the ability to toggle password masking. By default, it renders a checkbox that, when clicked, will unmask the password field, allowing the user to read the entered value. This provides two key advantages for login and sign-up forms: (1) it grants users the ability to check for and correct typos, and (2) it would remove the need for the second password field used to ensure matching values.

Credit for the idea is due to Anthony T, author of the Smashing Magazine article "[Better Password Masking For Sign-Up Forms](http://uxdesign.smashingmagazine.com/2012/10/26/password-masking-hurt-signup-form/)"

## Demo

To get an idea for how the plugin works, visit the demo site:

[http://aduth.github.com/jquery.passwordMask/](http://aduth.github.com/jquery.passwordMask/)

## Usage

#### Default (no options)


$(document).ready(function() {
$('#pwd_noparam').passwordMask();
});

#### Shown by default


$(document).ready(function() {
$('#pwd_shown').passwordMask({ isShown: true });
});

#### Custom toggle text


$(document).ready(function() {
$('#pwd_customtext').passwordMask({ toggleText: 'Make password visible' });
});

#### Custom toggler


Toggle Password Visibility


$(document).ready(function() {
$('#pwd_customtoggle').passwordMask('#btn_toggler');
// OR: $('#pwd_customtoggle').passwordMask($('#btn_toggler'));
// OR: $('#pwd_customtoggle').passwordMask({ toggler: '#btn_toggler' });
// OR: $('#pwd_customtoggle').passwordMask({ toggler: $('#btn_toggler') });
});

## License

Released under the MIT License (see LICENSE.txt)

Copyright (C) 2012 Andrew Duthie