placeholderPatch is a simple jQuery polyfill that provides support for the HTML5 placeholder attribute in older browsers.
The plugin is activated simply by including the file in the page. If you need to explicitly call the function on an element then you can do so:
$('#myInput').placeholder();
You probably want to add a style to your placeholders:
input.placeholder { color: #CCC; }
Customise the placeholder class applied to the input:
$('#myInput').placeholder({placeholderClass: 'customPleaceholderClass'});
- Keep label until text is entered in input
- Support password inputs
Licensed under the MIT: http://www.opensource.org/licenses/mit-license.php
Copyright (c) 2013 Alex Rabarts