Skip to content
r.

jquery-placeholder

mathiasbynens/jquery-placeholder · Public GitHub repository

A jQuery plugin that enables HTML5 placeholder behavior for browsers that aren’t trying hard enough yet

Open project in RepoShelf

Open the project to try its demo, view the repository, or save it to your collection. Repository and demo actions use RepoShelf’s sign-in flow.

jquery-placeholder live demo screenshot
Captured from the live demo · 2026-10-31

About this project

Author-written excerpt from the project README.

By default, .placeholder css class will be added. You can override default by passing the customClass option:

You’ll still be able to use jQuery.val() to get and set the input values. If the element is currently showing a placeholder, .val() will return an empty string instead of the placeholder text, just like it does in browsers with a native @placeholder implementation. Calling .val('') to set an element’s value to the empty string will result in the placeholder text (re)appearing.

Requirements and intended audience

By default, .placeholder css class will be added. You can override default by passing the customClass option:

Not recorded: account, external api key, paid service, self-hosting. Missing information does not mean there are no requirements.

Statements extracted from the author’s documentation · Checked 2026-11-03. Source: https://github.com/mathiasbynens/jquery-placeholder/blob/master/README.md

Recorded maintenance information

Last recorded source update: 2020-10-20. Saved release: v2.3.1 · 2015-12-17. These dates do not guarantee ongoing maintenance.

Technologies
JavaScript
Licence
MIT. Generally permits modification and commercial use, subject to the licence’s notices and conditions.
Demo check
A public page loaded on 2026-11-20. This does not test every feature.

Browse related categories