Password Input
How do I make an password input?
Type in a random password (or word) and see the bar below increase. The greater the length of your password, the greater the level of the bar. Also a little message is set to appear for each level.. What is a password input? How do you make a password input? This script and codes were developed by Andy Lorimer on 22 July 2022, Friday.
Password Input - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Password Input</title> <link rel='stylesheet prefetch' href='http://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/themes/smoothness/jquery-ui.css'> <link rel="stylesheet" href="css/style.css">
</head>
<body> <h1>Test your password strength</h1>
<div class="wrapper"> <input type="password" placeholder="Enter a Password" /> <div class="strength"> <div class="bar"></div> <div class="tooltip"></div> </div>
</div> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
<script src='http://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/jquery-ui.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Password Input - Script Codes CSS Codes
@import url('http://fonts.googleapis.com/css?family=Hind');
body { margin: 0; padding: 0; font-family: 'Hind'; background: #d71e3b;
}
h1 { margin: 20px 0 0 0; text-align: center; font-size: 30px; color: rgba(0, 0, 0, 0.2);
}
.wrapper { position: absolute; top: 50%; left: 50%; -webkit-transform: translate(-50%, -50%); -moz-transform: translate(-50%, -50%); -o-transform: translate(-50%, -50%); -ms-transform: translate(-50%, -50%); transform: translate(-50%, -50%);
}
input { width: 300px; height: 50px; font-family: 'Hind'; font-size: 18px; padding: 0 10px; background: rgba(0, 0, 0, .2); border: none; margin-bottom: 15px; color: #fff;
}
input:focus { outline: none;
}
.strength { position: relative; width: 100%; height: 10px; background: rgba(0, 0, 0, .2); border-radius: 100px;
}
.bar { position: absolute; left: 0; background: #fff; border-radius: 100px; width: 0; height: 100%; -webkit-transition: 0.5s ease; -moz-transition: 0.5s ease; -o-transition: 0.5s ease; transition: 0.5s ease;
}
.tooltip { position: relative; display: none; padding: 10px 20px; text-align: center; background: black; bottom: -30px; color: #fff; left: 50%; -webkit-transform: translateX(-50%); -moz-transform: translateX(-50%); -o-transform: translateX(-50%); -ms-transform: translateX(-50%); transform: translateX(-50%);
}
.tooltip:before { content: ''; position: absolute; top: -10px; left: 50%; border: solid 5px; border-color: transparent transparent black transparent; -webkit-transform: translateX(-50%); -moz-transform: translateX(-50%); -o-transform: translateX(-50%); -ms-transform: translateX(-50%); transform: translateX(-50%);
}
Password Input - Script Codes JS Codes
$('input').on('keyup', function() { var count = $(this).val().length; if (count == 0) { $('.bar').css('width', '0%'); $('.tooltip').fadeOut(); } else { if (count <= 4) { $('.bar').css('width', '25%'); $('.tooltip').fadeIn(); $('.tooltip').text('That\'s weak bro\''); } if (count <= 8 && count >= 5) { $('.bar').css('width', '50%'); $('.tooltip').text('Half way there'); } if (count <= 12 && count >= 9) { $('.bar').css('width', '75%'); $('.tooltip').text('Okay, that\'s pretty strong'); } if (count <= 16 && count >= 13) { $('.bar').css('width', '100%'); $('.tooltip').text('Alright, you\'re sweet'); } }
});
Developer | Andy Lorimer |
Username | andylorimer |
Uploaded | July 22, 2022 |
Rating | 3.5 |
Size | 2,548 Kb |
Views | 36,432 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
Scroll down button | 2,081 Kb |
Messing about with CSS3 animations | 1,831 Kb |
Social Icons Transition | 2,054 Kb |
Off-Canvas Menu | 2,794 Kb |
Vertically aligning content | 2,875 Kb |
Sign-up Card | 2,945 Kb |
More button Loader | 2,119 Kb |
Feature Slider | 3,003 Kb |
Masked.js | 3,037 Kb |
Loading Animation | 1,840 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
Hover Animation from UNIQLO | Insprd | 3,772 Kb |
Pure CSS Menu | Bronsrobin | 3,321 Kb |
SlideDown FixedMenu | Mp_graphic | 5,602 Kb |
Slick Slider | Wearebold | 5,913 Kb |
Nested table email layout | Massimo-cassandro | 2,355 Kb |
03 - CSS Variables | Run-time | 2,682 Kb |
Zip Button test | Lje7462 | 1,932 Kb |
FreeCodeCamp - Simon Game | Ivhed | 8,481 Kb |
Twitch JSON API | Jvhti | 2,808 Kb |
Sassy Buttons | Elyseholladay | 2,299 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!