File: index.html

package info (click to toggle)
jquery-mobile 1.4.5%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster
  • size: 15,808 kB
  • sloc: makefile: 42; php: 18
file content (46 lines) | stat: -rw-r--r-- 1,725 bytes parent folder | download | duplicates (2)
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
<!DOCTYPE html>
<html>
	<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<title>Dynamic toolbars - jQuery Mobile Demos</title>
	<link rel="shortcut icon" href="../favicon.ico">
    <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Open+Sans:300,400,700">
	<link rel="stylesheet" href="../css/themes/default/jquery.mobile-1.4.5.min.css">
	<link rel="stylesheet" href="../_assets/css/jqm-demos.css">
	<script src="../js/jquery.js"></script>
	<script src="../_assets/js/index.js"></script>
	<script src="../js/jquery.mobile-1.4.5.min.js"></script>
	<script>
    	$( document ).on( "click", "#inject-toolbars", function() {
    		$( "<div data-role='header'><h1>Dynamic header</h1></div>")
    			.prependTo( "#page-with-dynamic-toolbars" )
    			.toolbar({ position: "fixed" });

    		$( "<div data-role='footer'><h4>Dynamic footer</h4></div>")
    			.appendTo( "#page-with-dynamic-toolbars" )
    			.toolbar({ position: "fixed" });
    		// Update the page height and padding
    		$.mobile.resetActivePageHeight();
    	});
	</script>
</head>
<body>
	<div data-role="page" class="jqm-demos" id="page-with-dynamic-toolbars">

		<div role="main" class="ui-content jqm-content jqm-fullwidth">

			<h1>Dynamic toolbars</h1>

			<p>click on the button to dynamically inject toolbars. Note that we have to update the page height and padding by calling <code>$.mobile.resetActivePageHeight();</code>.</p>

			<div data-demo-html="#page-with-dynamic-toolbars" data-demo-js="true">
				<button id="inject-toolbars" class="ui-btn ui-btn-inline ui-corner-all">Inject toolbars</button>
			</div>

		</div><!-- /content -->

	</div><!-- /page -->

</body>
</html>