Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
29 lines (19 sloc) 741 Bytes

jQuery Auto Placeholders <1kb

This simple jQuery plugin adds support for the HTML5 placeholder attribute on older browsers.

It automatically checks the browser compability, and if it doesn't support placeholders this plugin will mimic the exact behaivior.



<script type="text/javascript" src="min/"></script>

If you want the placeholder to look like a real placeholder you should also add this CSS:

.placeholder {
	color: darkGrey;

And then you can use this on any HTML element:



  • Tested against jQuery 1.7.1
  • Will use Modernizr if detected, but doesn't depend on it.