forked from robvolk/jQuery.InputHints
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Demo.html
63 lines (51 loc) · 1.42 KB
/
Demo.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<html>
<head>
<title>jQuery Form Input Hints Plugin Demo</title>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script type="text/javascript" src="jquery.inputhints.js"></script>
<style>
input
{
height: 32px;
padding: 4px 6px;
font-size: 14px;
line-height: 20px;
}
input.hint
{
color: #888;
}
</style>
<script type="text/javascript">
$(function () {
$('input[placeholder]').inputHints();
});
</script>
</head>
<body>
<h1>
jQuery Form Input Hints Plugin Demo</h1>
<a href="https://github.com/robvolk/jQuery.InputHints">Github project</a> | <a
href="http://blog.robvolk.com/2009/01/jquery-form-input-hints.html">Project Blog
Post</a>
<h2>
Example</h2>
<form>
<input type="text" placeholder="Hint Text!" />
</form>
<h2>
Usage</h2>
<pre>
<script type="text/javascript">
$(function () {
// hook up placeholder text on any input with a placeholder attribute
<span style="background-color: yellow;">$('input[placeholder]').inputHints();</span>
});
</script>
<style>
input.hint { color: #888; }
</style>
<input type="text" placeholder="Hint Text!" />
</pre>
</body>
</html>