
Security News
Browserslist-rs Gets Major Refactor, Cutting Binary Size by Over 1MB
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
strength.js
Advanced tools
The ultimate jQuery password input plugin. Featuring secure strength indicator and hide/show password
The ultimate jQuery password input plugin. Featuring secure strength indicator and hide/show password
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
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>
You must give your password input a unique ID.
<input id="myPassword" type="password" name="" value="">
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'
});
</tbody>
</table>
Variable | Default Value | Description | Valid Options |
---|---|---|---|
strengthClass | strength | The CSS class that you want your input field to have | |
strengthMeterClass | strength_meter | The CSS class that you want your input field to have | |
strengthButtonClass | button_strength | The CSS class that you want the toggle button to have | |
strengthButtonText | Show Password | The text that you want to show for the toggle button | |
strengthButtonTextToggle | Hide Password | The toggled text that you want to show for the toggle button |
FAQs
The ultimate jQuery password input plugin. Featuring secure strength indicator and hide/show password
The npm package strength.js receives a total of 1 weekly downloads. As such, strength.js popularity was classified as not popular.
We found that strength.js demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.
Security News
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.