https://github.com/milly/jquery_placeholder
HTML5 placeholder attribute enabler in old browsers.
https://github.com/milly/jquery_placeholder
Last synced: about 1 year ago
JSON representation
HTML5 placeholder attribute enabler in old browsers.
- Host: GitHub
- URL: https://github.com/milly/jquery_placeholder
- Owner: Milly
- Created: 2011-04-20T09:46:17.000Z (about 15 years ago)
- Default Branch: master
- Last Pushed: 2011-04-20T10:11:51.000Z (about 15 years ago)
- Last Synced: 2025-04-03T14:44:20.391Z (about 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 93.8 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# jQuery Form Placeholder
[HTML5 `placeholder` attribute](http://www.w3.org/TR/html5/common-input-element-attributes.html#the-placeholder-attribute) enabler in old browsers.
## Requirements
* [jQuery](http://jquery.com) 1.3 or later
## Author
* Milly
## Lisence
* Creative Commons BY-SA
## Usage
Options:
* `enabled` {Boolean} - enabled placeholder (Default: auto)
* `elements` {String} - form elements selector (Default: ':text,:password,textarea')
* `attr` {String} - placehold message attribute (Default: 'placeholder')
* `color` {String} - placehold color (Default: 'silver')
* `cssClass` {String} - placehold class (Default: 'placeholder')
* `message` {String} - placehold message (Default: '')
HTML Example:
Script Example:
// Setup placeholder
$('form').placehold();
// Disable placeholder
$('form').placehold({enabled:false});
// Set placehold color and message
$(':text[name=email]').placehold({ color: '#ff8888', message: 'Your e-mail' });
// Set global options
$.fn.placehold.conf.color = '#ff8888';
// Get Placeholder instance, and clear placehold message
$('#email').data('placehold').clear();