Extra Credit Assignment 3
Encrypting jQuery Exercise
by Larry Adams
HTML
<input class="password" type="password" size="30" name="params[password]" value="" data-indicator="strengthLevel">
<div id="strengthLevel" class="password_strength pass_state01"></div>
CSS
.password_strength {
width: 150px;
height: 22px;
}
.pass_state01 {
background-image: url("images/strength_1.gif");
}
.pass_state02 {
background-image: url("images/strength_2.gif");
}
.pass_state03 {
background-image: url("images/strength_3.gif");
}
.pass_state04 {
background-image: url("images/strength_4.gif");
}
JavaScript
// jQuery Password Checker
/*
* Base code was used from
* http://runnable.com/UfJrnXtk2tZXAAA1/how-to-check-password-strength-using-jquery
* How to check password strength using jQuery
Assignment Task is to use a password generator and set the parameters regx in jQuery to the new parameters in the password for better security.
Create a strong password that meets the following requirements:
* Alpha, numeric, special characters, lengthen min/max, and lower/upper case.
*/
/*
jQuery document ready.
*/
$(function(){
$('.password').hippoPasswordStrength({
indicator_prefix: "pass_state0" // default "password_strength"
});
});