aboutsummaryrefslogtreecommitdiffstats
path: root/demos/tooltip/forms.html
blob: 626161d6e1e3625919b300b58d6353adb5fce0f6 (plain)
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
<!doctype html>
<html lang="en">
<head>
	<title>jQuery UI Tooltip - Default demo</title>
	<link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
	<script type="text/javascript" src="../../jquery-1.4.2.js"></script>
	<script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
	<script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
	<script type="text/javascript" src="../../ui/jquery.ui.position.js"></script>
	<script type="text/javascript" src="../../ui/jquery.ui.tooltip.js"></script>
	<script type="text/javascript" src="../../ui/jquery.ui.button.js"></script>
	<link type="text/css" href="../demos.css" rel="stylesheet" />
	<script type="text/javascript">
	$(function() {
		$("[title]").tooltip();
		$("<button/>").text("Show help").button().toggle(function() {
			$(":ui-tooltip").tooltip("open");
		}, function() {
			$(":ui-tooltip").tooltip("close");
		}).appendTo("form");
	});
	</script>
	<style>
		label { display: inline-block; width: 5em; }
		.ui-icon { display: inline-block; }
		fieldset div {
			margin-bottom: 2em;
		}
		.ui-tooltip { width: 200px; }
	</style>
</head>
<body>

<div class="demo">

	<form>
		<fieldset>
			<div>
				<label for="firstname">Firstname</label>
				<input id="firstname" name="firstname" />
				<span title="Please provide your firstname." class="ui-state-default ui-corner-all ui-icon ui-icon-help">?</span>
			</div>
			<div>
				<label for="lastname">Lastname</label>
				<input id="lastname" name="lastname" />
				<span title="Please provide also your lastname." class="ui-state-default ui-corner-all ui-icon ui-icon-help">?</span>
			</div>
			<div>
				<label for="address">Address</label>
				<input id="address" name="address" />
				<span title="Your home or work address." class="ui-state-default ui-corner-all ui-icon ui-icon-help">?</span>
			</div>
		</fieldset>
	</form>

</div><!-- End demo -->



<div class="demo-description">

<p>Hover the questionmark-buttons or use the button below to display the help texts all at once. Click again to hide them.</p>

</div><!-- End demo-description -->



</body>
</html>