jQuery plugin that provides default values to login forms' username and password fields. Works by hiding the real password field and creating a fake password text field so the default value can be shown as text. When the focus
event is called on the fake password field, it is hidden and replaced by the real password field. Simples!
- version - 0.1
- homepage - http://github.com/aaronrussell/jquery-simply-smart-login-fields/
- author - Aaron Russell
Simple usage:
$('#login_form').simplySmartLoginFields();
Advanced usage:
$('#login_form').simplySmartLoginFields({
usernameSelector: 'input[name="username"]',
passwordSelector: 'input[name="password"]',
usernameValue: 'Username...',
passwordValue: 'Password...'
});
usernameSelector
- A jQuery selector to match the username field. Defaults toinput[name="username"]
.passwordSelector
- A jQuery selector to match the password field. Defaults toinput[name="password"]
.usernameValue
- The default value for the username field. Defaults toUsername...
.passwordValue
- The default value for the username field. Defaults toPassword...
.
Dual licensed under the MIT and GPL licenses.
Copyright (c) 2010 Aaron Russell.