It's a very simple jQuery plugin that shows the content of a password input, so you don't need to add a "repeat your password" annoying input.
- Twitter Bootstrap 2.1.0 and the Tooltip plugin.
- jQuery 1.9.0.
Add the JS file.
<script src="showpassword.js"></script>
Create a normal Twitter Bootstrap input field for the password.
<div class="control-group">
<label class="control-label" for="inputPassword">Password</label>
<div class="controls">
<input type="password" id="inputPassword" placeholder="Password">
</div>
</div>
And then, call the plugin in the password input.
$('#inputPassword').showPassword();
You can define the color of the icon (black by default) or a custom tooltip text passing the options:
$('#inputPassword').showPassword({
white : true,
message : 'Click here, dummie!'
});
- Code refactoring.
- Handle existing password values (thanks, realityking).
- Bug fixed.
- Bug solving (changed display method and defined the width of the new input).
- Code refactoring.
- Switched to inputs instead of a tooltip.
- Added option 'message' to show a custom text in the tooltip.
- Added the icon color option.
- Changed some callbacks and added the "click" trigger.
- First commit. Yay.
- Add options like trigger, delay, etc.