MOBILE - JQuery Mobile 1.4 - back button
by bizamajig
HTML
<html>
<head>
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.0-beta.1/jquery.mobile-1.4.0-beta.1.min.css" />
<script src="http://code.jquery.com/jquery-1.10.2.min.js"></script>
<script>
$(document).on("mobileinit", function() {
$.mobile.toolbar.prototype.options.addBackBtn = true;
$.mobile.toolbar.prototype.options.backBtnText = "Back";
});
</script>
<script src="http://code.jquery.com/mobile/1.4.0-beta.1/jquery.mobile-1.4.0-beta.1.min.js"></script>
</head>
<body>
<div data-role="page" id="p1">
<div data-role="header" data-position="fixed">
<h1>Head - Page 1
</h1>
</div>
<div data-role="content"> <a href="#p2">page2</a>
</div>
<div data-role="footer" data-position="fixed">
<h1>Footer
</h1>
</div>
</div>
<div data-role="page" id="p2">
<div data-role="header" data-position="fixed">
<h1>Head - Page 2
</h1>
</div>
<div data-role="content"><a href="#p3">page3</a>
</div>
<div data-role="footer" data-position="fixed">
<h1>Footer
</h1>
</div>
</div>
<div data-role="page" id="p3">
<div data-role="header" data-position="fixed">
<h1>Head - Page 3
</h1>
</div>
<div data-role="content"> <a href="#p1">Home</a>
</div>
<div data-role="footer" data-position="fixed">
<h1>Footer
</h1>
</div>
</div>
</body>
</html>