This plugin enables the display of HTML5-style placeholder labels in older browsers.
The plugin will be auto-disabled when used in a modern browser that supports HTML5 placeholders.
$('input:text[placeholder]').placeholderLabel();
then set a CSS style such as
input.placeholder { color: #CCC; font-style: italic; }
you can set an alternate css class:
$('input:text[placeholder]').placeholderLabel({placeholder_class: 'dull'});
Tested in the following browsers:
-
Internet Explorer 6, 7, 8
-
Firefox 3.x
-
Google Chrome 8, 9
-
Safari 5