aboutsummaryrefslogtreecommitdiffstats
path: root/demos/popup/default.html
blob: 7092f342df9fb331da93d3a6ce34c7a779dbd72c (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>
<head>
	<title>jQuery UI Popup - Default demo</title>
	<link rel="stylesheet" href="../demos.css" />
	<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css" title="ui-theme" />
	<script src="../../jquery-1.6.4.js"></script>
	<script src="../../ui/jquery.ui.core.js"></script>
	<script src="../../ui/jquery.ui.widget.js"></script>
	<script src="../../ui/jquery.ui.position.js"></script>
	<script src="../../ui/jquery.ui.button.js"></script>
	<script src="../../ui/jquery.ui.popup.js"></script>
	<script>
	$(function() {
		var selected = {
			select: function( event, ui ) {
				$( "<div/>" ).text( "Selected: " + ui.item.text() ).appendTo( "#log" );
				$(this).popup("close");
			}
		};

		$("#login-form").popup()
			.find(":submit").button().click(function(event) {
				event.preventDefault();
			});
	});
	</script>
	<style type="text/css">
		.ui-popup { position: absolute; z-index: 5000; }

		#login-form {
			width: 16em; border: 1px solid gray; border-radius: 5px;
			padding: 1em;
			box-shadow: 3px 3px 5px -1px rgba(0, 0, 0, 0.5);
			background: lightgray; background-image: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#ddd));
			font-size: 1.3em; outline: none;
		}
		#login-form label { display: inline-block; width: 5em; }
		#login-form .submit { margin-left: 5em; }
 	</style>
</head>
<body>

<div class="demo">
	<a href="#login-form">Log In</a>
	<div class="ui-widget-content" id="login-form" aria-label="Login options">
		<div>
			<label for="un">Username</label>
			<input type="text" id="un" />
		</div>
		<div>
			<label for="pw">Password</label>
			<input type="password" id="pw" />
		</div>
		<div>
			<input type="submit" value="Login" class="submit" />
		</div>
	</div>
</div>

<div class="demo-description">

<p>A link to a login form that opens as a popup.</p>

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


</body>
</html>