This is a JQuery plugin I wrote to handle the little bits of placeholder text in form textfields that everybody likes.
Code:
$("#example_field1").placeholdr();
Code:
$("#example_field2").placeholdr({
className: 'alt-placeholder',
placeholderText: 'Full Name'
});
How exciting! Download it here!
Name | Description | Default Value |
---|---|---|
className | The class name applied to the element when the placeholder is visible. | placeholder |
placeholderText | The text used for the placeholder. If not specified, this value is inherited from the value of the text field when placeholdr() is called | null (inherited from element) |
clearOnSubmit | Adds a check to the containing forms onSubmit event, checking whether the placeholder is visible and clearing it if so | True |
Thanks to Trevor Morris for his nice jquery plugin skellington