-
Notifications
You must be signed in to change notification settings - Fork 1
/
example-1.html
75 lines (72 loc) · 2.03 KB
/
example-1.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
<!DOCTYPE html>
<html>
<head>
<title>jQuery Mobile</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.1.0-rc.1/jquery.mobile-1.1.0-rc.1.min.css" />
<script src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
<script src="http://code.jquery.com/mobile/1.1.0-rc.1/jquery.mobile-1.1.0-rc.1.min.js"></script>
<script>
// Bind to all page events to demonstrate event order
// Delegate events to sections where relevant
$(document).on("pageshow", "section", function() {
console.log('pageshow');
});
$(document).on("pagehide", "section", function() {
console.log('pagehide');
});
$(document).on("pageinit", "section", function() {
console.log('pageinit');
});
$(document).on("pagebeforecreate", "section", function() {
console.log('pagebeforecreate');
});
$(document).on("pagecreate", "section", function() {
console.log('pagecreate');
});
$(document).on("pagebeforeshow", "section", function() {
console.log('pagebeforeshow');
});
$(document).on("pagebeforehide", "section", function() {
console.log('pagebeforehide');
});
$(document).on("pagebeforechange", "section", function() {
console.log('pagebeforechange');
});
$(document).on("pagechange", "section", function() {
console.log('pagechange');
});
$(document).on("pagebeforeload", function() {
console.log('pagebeforeload');
});
$(document).on("pageload", function() {
console.log('pageload');
});
</script>
</head>
<body>
<!-- Begin: page -->
<section data-role="page" id="page1">
<header data-role="header">
<h1>jQuery Mobile</h1>
</header>
<div data-role="content">
<p>This is Page 1.
<a href="#dialog" data-rel="dialog">Show Dialog</a></p>
<a href="external.html">Go to page 2</a></p>
</div>
<footer data-role="footer">
<h3>O'Reilly</h3>
</footer>
</section>
<!-- Begin: dialog -->
<section data-role="page" id="dialog">
<header data-role="header">
<h1>jQuery Mobile</h1>
</header>
<div data-role="content">
<p>This is a dialog.</p>
</div>
</section>
</body>
</html>