Adds a link to toggle the masking of a password input field.
JavaScript
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
scripts
stylesheets
README.markdown
index.htm

README.markdown

Adds a link to toggle the masking of a password input field.

Some Simple CSS:

.forms li {
  position: relative;
}
.show-password-link {
  display: block;
  position: absolute;
  z-index: 11;
}
.password-showing {
  position: absolute;
  z-index: 10;
}

Example Usage with Defaults:

$(':password').showPassword({
  linkClass: 'show-password-link', //Class to use for the toggle link
  linkText: 'Show', //Text for the link
  showPasswordLinkText: 'Hide', //Text for the link when password is not masked
  showPasswordInputClass: 'password-showing', //Class for the text input that will show the password
  linkRightOffset: 0, //Offset from the right of the parent
  linkTopOffset: 0 //Offset from the top of the parent
});