forked from ytiurin/html5tooltipsjs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample.html
More file actions
157 lines (140 loc) · 3.4 KB
/
example.html
File metadata and controls
157 lines (140 loc) · 3.4 KB
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
<!DOCTYPE html>
<html><head>
<title>HTML5 Tooltips example</title>
<link rel="stylesheet" type="text/css" href="./html5tooltips.css" />
<link rel="stylesheet" type="text/css" href="./html5tooltips.animation.css" />
<script type="text/javascript" src="./html5tooltips.js"></script>
<style type="text/css">
body {
width: 35em;
margin: 0 auto;
font-family: Tahoma, Verdana, Arial, sans-serif;
}
</style>
</head><body>
<form action="#" method="post">
<h3>Register new customer</h3>
<fieldset>
<legend>Login and password</legend>
<table>
<tbody>
<tr>
<td>
<label for="name">Login name</label>
</td>
<td>
<input id="name" type="text" />
</td>
</tr>
<tr>
<td>
<label for="password">Password</label>
</td>
<td>
<input id="password" type="password" />
</td>
</tr>
<tr>
<td>
<label for="password2">Repeat password</label>
</td>
<td>
<input id="password2" type="password" />
</td>
</tr>
</tbody>
</table>
</fieldset>
<br>
<fieldset>
<legend>Contact information</legend>
<table>
<tbody>
<tr>
<td>
<label for="fullname">Full name</label>
</td>
<td>
<input id="fullname" type="text" />
</td>
</tr>
<tr>
<td>
<label for="email">Email</label>
</td>
<td>
<input id="email" type="text" />
</td>
</tr>
<tr>
<td>
<label for="phone">Phone</label>
</td>
<td>
<input id="phone" type="text" />
</td>
</tr>
<tr>
<td>
<label for="address">Address</label>
</td>
<td>
<textarea id="address"></textarea>
</td>
</tr>
</tbody>
</table>
</fieldset>
</form>
<script type="text/javascript">
html5tooltips([
{
contentText: "Short and easy to remember",
contentMore: "Should <span style='text-decoration:underline;'>not</span> contain white spaces or special characters",
targetSelector: "#name",
stickTo: "top",
maxWidth: 180
},
{
contentText: "Not less then 8 characters",
contentMore: "May contain d<span style='color:red;'>1</span>g<span style='color:red;'>1</span>ts and sp<span style='color:red;'>3</span>c<span style='color:red;'>!</span>al sym<span style='color:red;'>6</span>ols",
targetSelector: "#password",
stickTo: "right",
color:'metalic silver',
maxWidth: 180
},
{
contentText: "To ensure you remember it",
targetSelector: "#password2"
},
{
contentText: "Your first and second name",
stickTo: "right",
targetSelector: "#fullname"
},
{
contentText: "It would be used to restore your password",
stickTo: "right",
targetSelector: "#email"
},
{
contentText: "We may call you to verify your identity",
stickTo: "right",
targetSelector: "#phone"
},
{
contentText: "For post delivery",
contentMore: "It should contain zip code and country name",
stickTo: "right",
targetSelector: "#address",
maxWidth: 180
}
]);
html5tooltips({
contentText: "Click to focus the field",
targetSelector: "label",
},
{
});
</script>
</body></html>