Skip to content

Latest commit

 

History

History
14 lines (9 loc) · 561 Bytes

File metadata and controls

14 lines (9 loc) · 561 Bytes

Augments and polyfills the html5 placeholder attribute.

When you focus a field it keeps the placeholder text until you start typing. This keeps users from forgetting what the field is before they start typing.

Usage:

  1. include js
  2. add placeholder attribute to fields you want
  3. invoke plugin with window.initPlaceholder()

Demo: http://jethrolarson.github.io/placeholder-augment/

License: MIT or WTFPL whichever you prefer

Note: I've not updated this in a while so I'm not sure if browser support is up to 2013 standards. Feel free to contribute.