forked from andrewrjones/jquery-placeholder-plugin
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c4162a1
commit ee50905
Showing
1 changed file
with
16 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
jQuery Placeholder Plugin | ||
------------------------- | ||
|
||
This is a small jQuery plugin that emulates the placeholder attribute in web browsers that do not support it. If the browser does support it, the plugin does nothing. | ||
|
||
To use the plugin, add the JS and CSS files to your page and do the following: | ||
|
||
jQuery(document).ready(function($) { | ||
$(":input[placeholder]").placeholder(); | ||
}); | ||
|
||
Then, in your HTML you can use the placeholder plugin as documented in the HTML5 spec: | ||
|
||
<input type="search" placeholder="Search..." /> | ||
|
||
For more information and some demos, see http://andrew-jones.com/jquery-placeholder-plugin |