-
Notifications
You must be signed in to change notification settings - Fork 82
/
example.html
147 lines (128 loc) · 3.73 KB
/
example.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
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
<!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;
height:9999px;
}
</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 data-tooltip-animate-function="spin" data-tooltip-stickto="right" data-tooltip-persistent="true">
<tbody>
<tr>
<td>
<label for="fullname">Full name</label>
</td>
<td>
<input id="fullname" type="text" data-tooltip="Your first and second name" data-tooltip-color="indigo" />
</td>
</tr>
<tr>
<td>
<label for="email">Email</label>
</td>
<td>
<input id="email" type="text" data-tooltip="It would be used to restore your password" data-tooltip-color="kelly" />
</td>
</tr>
<tr>
<td>
<label for="phone">Phone</label>
</td>
<td>
<input id="phone" type="text" data-tooltip="We may call you to verify your identity" data-tooltip-color="hot pink" />
</td>
</tr>
<tr>
<td>
<label for="address">Address</label>
</td>
<td>
<textarea id="address" data-tooltip="For post delivery" data-tooltip-more="It should contain zip code and country name" data-tooltip-color="bamboo" data-tooltip-delay="1000" data-tooltip-maxwidth="180"></textarea>
</td>
</tr>
</tbody>
</table>
</fieldset>
</form>
<script type="text/javascript">
for(var i=10;i--;)
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",
color: "violet",
maxWidth: 180
},
{
contentText: "<a href='http://example.com' target='_blank'>Generate</a>",
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,
persistent: true
},
{
contentText: "To ensure you remember it",
color: "rouge",
targetSelector: "#password2"
}
]);
for(var i=10;i--;)
html5tooltips({
contentText: "Click to focus the field",
color: "peacock",
targetSelector: "label",
});
for(var i=10;i--;)
html5tooltips.refresh();
console.log(
html5tooltips.getTooltipByTarget(
document.getElementById('address')));
</script>
</body></html>