Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

A jQuery plugin to enable the HTML5 `placeholder` attribute in all browsers.

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 example
Octocat-spinner-32 README.md
Octocat-spinner-32 jquery.placehold.js
Octocat-spinner-32 jquery.placehold.min.js
README.md

jquery-placehold

A jQuery plugin that enables the HTML5 placeholder attribute in browsers lacking native support.

Requirements

  • jQuery (1.5.1 or greater)
  • Firefox < 3.7, Safari < 4, Internet Explorer < 10

Usage

In your HTML:

<input type="text" name="phone" placeholder="+1 (555) 555-5555" />
<textarea name="comment" placeholder="Four score and seven years ago..."></textarea>

In your JavaScript:

$().ready( function() {
    $( 'input, textarea' ).placehold( 'placeholderClassName' );
});

placeholderClassName is an optional string and defaults to "placeholder."

Something went wrong with that request. Please try again.