Skip to content


Subversion checkout URL

You can clone with
Download ZIP
tree: 7e73f76fb5
Fetching contributors…

Cannot retrieve contributors at this time

72 lines (61 sloc) 2.211 kB
<!DOCTYPE html>
<title>Page Title</title>
<link rel="stylesheet" href="" />
<script type="text/javascript" src=""></script>
<script type="text/javascript" src="../js/"></script>
<script type="text/javascript" src=""></script>
<script type="text/javascript">
var router=new $.mobile.Router({
"#localpage2(?:[?/](.*))?": {
handler: "localpage", events: "bc,c,i,bs,s,bh,h"
"#index": { handler: function(type){
console.log("Index has been "+(type=="pagehide"?"hidden":"shown"));
}, events: "h,s" }
localpage: function(type,match,ui){
console.log("localpage2: "+type);
e.preventDefault(); e.stopPropagation();
console.log("Invoking changePage programmatically");
$.mobile.changePage( $( $(this).attr("href") ) );
<div data-role="page" id="index">
<div data-role="header">
<div data-role="content">
<p>Page 1</p>
<p>The output of this page can be seen in your javascript console.</p>
<a class="hooklink" href="#localpage2">#localpage2 without params (not supported by programmatic changePage with jquery objects in a multipage template)</a><br/>
<div data-role="footer">
<h4>Index footer</h4>
<div data-role="page" id="localpage2" data-add-back-btn="true">
<div data-role="header">
<h1>Localpage 2</h1>
<div data-role="content">
<p>This is the localpage 2 in the multipage template.</p>
<p><a class="hooklink" href="#index">Back to index</a></p>
<div data-role="footer">
<h4>Localpage 2 Footer</h4>
Jump to Line
Something went wrong with that request. Please try again.