All Projects → chemerisuk → better-placeholder-polyfill

chemerisuk / better-placeholder-polyfill

Licence: MIT license
Placeholder attribute polyfill for better-dom

Programming Languages

javascript
184084 projects - #8 most used programming language
CSS
56736 projects

better-placeholder-polyfill
Build Status Coverage Status Bower version

[placeholder] polyfill for better-dom

The placeholder attribute is quite useful and despite on "optional" sense in some UIs you have to include a polyfill that adds support in old browsers. The project implements consistent support for the placeholder attribute in browsers that do not handle it.

LIVE DEMO (open in IE < 10)

Features

  • live extension - works for current and future content
  • polyfills placeholder attribute
  • supports any kind of input (no issues with password) and textarea
  • does nothing if native support exists

Installing

Use bower to download this extension with all required dependencies.

$ bower install better-placeholder-polyfill

This will clone the latest version of the better-placeholder-polyfill into the bower_components directory at the root of your project.

Then append the following html elements on your page:

<script src="bower_components/better-dom/dist/better-dom.js"></script>
<script src="bower_components/better-placeholder-polyfill/dist/better-placeholder-polyfill.js"></script>

Browser support

Desktop

  • Chrome
  • Safari 6.0+
  • Firefox 16+
  • Opera 12.10+
  • Internet Explorer 8+ (see notes)

Mobile

  • iOS Safari 6+
  • Android 2.3+
  • Chrome for Android
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].