Need help with jQuery-html5-placeholder?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

Topener
124 Stars 77 Forks 52 Commits 2 Opened issues

Description

yet another placeholder plugin™

Services available

!
?

Need anything else?

Contributors list

# 30,362
macOS
pkg
nsis
msi
10 commits
# 232,243
C
C++
Shell
titaniu...
3 commits
# 45,953
JavaScr...
HTML
Shell
Node.js
2 commits
# 213,103
Shell
web-sta...
interop...
python3
1 commit
# 27,679
js
ecmascr...
specifi...
tests
1 commit
# 176,224
Symfony
PHP
lazy-lo...
Shell
1 commit
# 12,550
JavaScr...
React
uber
interse...
1 commit
# 17,497
Rails
sidekiq
Kuberne...
knative
1 commit
# 45,547
textboo...
React
atomic-...
lodash
1 commit
# 597,958
C#
c-sharp
1 commit

HTML5 placeholder plugin, version 1.01

Copyright (c) 2010-2014, Rene Pot, https://github.com/Topener/

Thanks to Mike Taylor, http://miketaylr.com for setting up initial version

MIT Licensed: http://www.opensource.org/licenses/mit-license.php

Enables cross-browser html5 placeholder for inputs, by first testing for a native implementation before building one. Special thanks to Ben Alman (http://benalman.com/) for suggesting a number of improvements.

The general strategy is one of adding a "position: absolute" label on top of the input element.

Known Issues

Firefox pre-filling input items causes issues. A possible workaround is to also set

autocomplete=false
on the input element(s) in question, if this makes user experience sense to do so (e.g. perhaps on a search box, but not the username field).

USAGE:

$('input[placeholder]').placeholder();

$('input[placeholder]').placeholder({
   color: '#bada55'
});

$('input[placeholder]').placeholder({
   inheritStyle: true /*no default styles will be applied*/
});

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.