jamesallardice / Placeholders.js

A JavaScript polyfill for the HTML5 placeholder attribute
http://jamesallardice.github.io/Placeholders.js
948 stars 232 forks source link

Placeholders.js - An HTML5 placeholder attribute polyfill

Placeholders.js is a polyfill (or shim, or whatever you like to call it) for the HTML5 placeholder attribute, as defined in the HTML5 specification. Placeholder attributes are valid on input elements of various types and textarea elements.

Placeholders.js is licensed under the MIT License. See the unminified file for the full license text.

Get it!

The polyfill is available through Bower:

bower install placeholders

Alternatively, you can download the polyfill and get a whole load of information and instructions at our website. If you're using Ruby on Rails, you can also try out our gem.

Supported Browsers

Placeholders.js aims to support the widest range of browsers possible. The idea is that you will be able to use the native placeholder attribute along with Placeholders.js and your users on any platform will get the same experience. This table will be updated as and when further browsers are tested. Mobile browser testing is a big one that's high on the list. Currently tested and working in the following browsers on (where applicable) both Windows 7 and CentOS 6:

Do you use some obscure browser that doesn't have native placeholder attribute support? If so, please let me know so I can make sure Placeholders.js works with it.