aaronrussell / jquery-simply-smart-login-fields

Provides default values to login forms' username and password fields.

Home Page:http://github.com/aaronrussell/jquery-smart-ass-login-values

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

jQuery Simply Smart Login Fields plugin

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!

Usage

Simple usage:

$('#login_form').simplySmartLoginFields();

Advanced usage:

$('#login_form').simplySmartLoginFields({
    usernameSelector: 'input[name="username"]',
    passwordSelector: 'input[name="password"]',
    usernameValue:    'Username...',
    passwordValue:    'Password...'
});

Options

  • usernameSelector - A jQuery selector to match the username field. Defaults to input[name="username"].
  • passwordSelector - A jQuery selector to match the password field. Defaults to input[name="password"].
  • usernameValue - The default value for the username field. Defaults to Username....
  • passwordValue - The default value for the username field. Defaults to Password....

License

Dual licensed under the MIT and GPL licenses.

Copyright (c) 2010 Aaron Russell.

About

Provides default values to login forms' username and password fields.

http://github.com/aaronrussell/jquery-smart-ass-login-values


Languages

Language:JavaScript 100.0%