Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

strength.js

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

strength.js

The ultimate jQuery password input plugin. Featuring secure strength indicator and hide/show password

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
21
increased by200%
Maintainers
1
Weekly downloads
 
Created
Source

Strength.js

The ultimate jQuery password input plugin. Featuring secure strength indicator and hide/show password

Documentation

Strength.js provides a toggle feature for password input fields that allows the user to view or asterisk the password. It also features a strength indicator to show how secure a users password is.

The password secuirty indicator is marked on 4 scores. These are

  • Password must contain 8 characters or more
  • Password must contain 1 lowercase letter
  • Password must contain 1 uppercase letter
  • Password must contain 1 number
..:: Getting Started
Include the relevant files

Firstly include jQuery and the strength.css and strength.js files. Place these before </head> section

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script type="text/javascript" src="strength.js"></script>
<script type="text/javascript" src="js.js"></script>
				
Create a password input field

You must give your password input a unique ID.

<input id="myPassword" type="password" name="" value="">
Initiate the plugin

Once you have created your password input field you will need to initiate the plugin.

At its most basic level you can initiate the plugin like:

$(document).ready(function ($) {

    $("#myPassword").strength();

});
				

If you want to initiate the plugin with options then you can do so like:

$('#myPassword').strength({
        strengthClass: 'strength',
        strengthMeterClass: 'strength_meter',
        strengthButtonClass: 'button_strength',
        strengthButtonText: 'Show password',
        strengthButtonTextToggle: 'Hide Password'
    });		
..:: Options
						</tbody>
					</table>
VariableDefault ValueDescriptionValid Options
strengthClassstrengthThe CSS class that you want your input field to have
strengthMeterClassstrength_meterThe CSS class that you want your input field to have
strengthButtonClassbutton_strengthThe CSS class that you want the toggle button to have
strengthButtonTextShow PasswordThe text that you want to show for the toggle button
strengthButtonTextToggleHide PasswordThe toggled text that you want to show for the toggle button

Keywords

FAQs

Package last updated on 25 Oct 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc