forked from jquery-archive/jquery-mobile
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstartpage.html
More file actions
51 lines (43 loc) · 1.42 KB
/
startpage.html
File metadata and controls
51 lines (43 loc) · 1.42 KB
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
<!DOCTYPE html>
<html>
<head>
<title>JQM latest - issue template</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="shortcut icon" href="../favicon.ico">
<link rel="stylesheet" href="../../css/themes/default/jquery.mobile.css">
<script src="../../js/jquery.js"></script>
<script src="../../js/"></script>
<script>
$('#page1').on('pagecreate', function() {
$('a').bind('click', function(e) {
var trans = $(this).text() || 'none',
rev = !!$('#cb1').attr('checked');
$.mobile.changePage('#page1', { transition: trans,
allowSamePageTransition: true,
reverse: rev } );
$('#p1').text( 'last transition: ' + trans + ' - reverse: ' + rev );
});
});
$('#page1').bind('pagehide', function(e) {
$('a.ui-btn').removeClass('ui-btn-active');
if ( !!$('#cb2').attr('checked') && !$(this).hasClass('ui-btn-active') ) {
$(this).addClass('ui-page-active');
}
});
</script>
<style>
#edit-with-js-bin { display: none !important; }
</style>
</head>
<body>
<div data-role="page" id="startpage" data-theme="a">
<div data-role="header">
<h1>same page transitions</h1>
</div><!-- /header 1 -->
<div data-role="content">
<a data-role="button" href="samepagetransition.html">Go to page 2</a>
</div><!-- /content 1 -->
</div><!-- /page 1 -->
</body>
</html>