pageshow and pagehide events
demonstrates prevPage and nextPage
by olli
HTML
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.0rc2/jquery.mobile-1.0rc2.min.css">
<script src="http://code.jquery.com/mobile/1.0rc2/jquery.mobile-1.0rc2.min.js"></script>
<body>
<div data-role="page" id="page_1">
<div data-role="header">
<h1>Page 1</h1>
</div>
<div data-role="content">
Page 1
</div>
</div>
<div data-role="page" id="page_2" >
<div data-role="header">
<h1>Page 2</h1>
</div>
<div data-role="content">
Page 2
</div>
</div>
</body>
JavaScript
$('#page_1').bind('pageinit', function() {
$.mobile.changePage( "#page_2", {
role: "dialog"
});
});