This plugin hasn’t been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.

HTML5 Placeholder Polyfill

Description

The HTML5 Placeholder Plugin simulates placeholder functionality for inputs and textareas, which is particularly handy in browsers that still need some work.

A MIGHTYminnow plugin.

Features

  • No setup necessary, works immediately after installing
  • Super lightweight, less than 3kb minified jQuery
  • Automatically detects for placeholder support – no need for extra feature detection like Modernizr
  • Based on Mathias Bynens’ widely popular and well tested polyfill – thanks Mathias!

How to use

This plugin creates and uses a placeholder() jQuery function, and invokes it for inputs and textareas. This happens automatically as soon as you install it. If for some crazy reason you would like to invoke it on other elements aside from inputs and textareas, you can do so with you own jQuery, like so:

jQuery('yourElement').placeholder()

Screenshots

  • Before installing the plugin (IE8, IE9, etc.)
  • After installing the plugin

FAQ

How does this plugin work?

This plugin implements an elegant jQuery script written by Mathias Bynens to simulate proper placeholder functionality in browsers that don’t natively support it. The current version of the plugin is based on the following version of Mathias’ code: https://github.com/mathiasbynens/jquery-placeholder/blob/fdd8d253edc8708fbe5d3ecf9a17a919713a3733/jquery.placeholder.js. It may be updated in the future if any improvements are made on his end.

I need to modify the plugin behavior, what should I do?
  1. Write to me with your request/suggestion – maybe the plugin should be improved for all.
  2. If you’d rather have at it yourself, more power to you. The plugin utilizes jQuery that has been minified (html5-placeholder-polyfill.min.js), but the unminified version is also included (html5-placeholder-polyfill.js). You can tinker with the unminified version, minify it, and copy it into html5-placeholder-polyfill.min.js.

Changelog

= 1.2.0
* Functionality added to admin and login screen.
* Added support for SCRIPT_DEBUG (non-minified jQuery is included if SCRIPT_DEBUG is set to true).

1.1.0

  • Removed extra blank lines at end of main php file causing the following error: “The plugin generated 2 characters of unexpected output during activation. If you notice “headers already sent” messages, problems with syndication feeds or other issues, try deactivating or removing this plugin.”

1.0.0

  • Switching to non-beta version number

0.1.0

  • First release

Contributors & Developers

This is open source software. The following people have contributed to this plugin.

Contributors

Browse the code