H5Placeholder 1.1b

Fallback for browsers that do not support the placeholder property.



Details

Author
Arieh Glazer
Current version
1.1b
GitHub
arieh/Placeholder
Downloads
4664
Category
Utilities
Tags
Report
GitHub Issues

Releases


Dependencies

  • _self_/_current_: core/1.3: [Class,Class.Extras]

How to use

The simplest way to create the placeholder is to use the utility method:

Placeholder.create(options);

This method will check for placeholder support. If it doesn't exist, it will create placeholders for all elements with the placeholder attribute.

You can also create a placeholder for a single input:

new Placeholder('input-id',options);

If needed, the placeholder instance of an element can be accessed through the element's storage under "Placeholder".


Options

  • className - the class name for the placeholder label
  • input_class - will be used for the input's class (used for making sure the input's background is transparent)

Discuss

A note on comments here: These comments are moderated. No comments will show up until they are approved. Comments that are not productive (i.e. inflammatory, rude, etc) will not be approved.

Found a bug in this plugin? Please report it this repository's Github Issues.

blog comments powered by Disqus