Skip to content

NV/placeholder.js

gh-pages
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 

placeholder.js — bring HTML 5 placeholder attribute to all browsers

placeholder.js is not maintained any more. Use one of those:

placeholder

The placeholder attribute is the part of HTML5 specification. Currently, it works only in WebKit-based browsers, like Google Chrome and Safari. Placeholder.js fixes it!

Tested on IE 6—8, Firefox 3.5, Safari 4—5, Google Chrome 3—6, Opera 9.5—10.6.

jquery.textPlaceholder.js

CSS: .text-placeholder {color: #AAA !important}
JS: $("[placeholder]").textPlaceholder();

An example.

placeholder.js (pure JS version)

JS: inputPlaceholder(document.getElementById('some_input'), "#AAA")

An example.

Limitations

placeholder.js doesn't work with <input type='password'> in IE (at least in IE ≤ 9).

About

Brings HTML5 placeholder attribute into all modern browsers (not maintained any more)

Resources

License

Stars

Watchers

Forks

Packages

No packages published