<!DOCTYPE html>
<html>
<head>
<title>Page 1 Title</title>
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.css" />
<script src="http://code.jquery.com/jquery-1.8.2.min.js"></script>
<script src="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.js"></script>
</head>
<body>
<div data-role="page" id="page1">
<div data-role="header">
<h1>First Page Title</h1>
</div><!-- /header -->
<div data-role="content">
<p>Content for the first page can come here.</p>
<p>Click <a href="#page2">here</a> to view the second page.</p>
</div><!-- /content -->
<div data-role="footer">
<h4>First Page Footer</h4>
</div><!-- /footer -->
</div><!-- /page -->
<div data-role="page" id="page2">
<div data-role="header">
<h1>Second Page Title</h1>
</div><!-- /header -->
<div data-role="content">
<p>Content for the second page will come here.</p>
<p>Click <a href="#page1">here</a> to go back to the first page.</p>
<p>Click <a href="#page3">page 3</a> to navigate to the third page. The third page has id="page3"</p>
<p>The first page has id="page1"</p>
</div><!-- /content -->
<div data-role="footer">
<h4>Second Page Footer</h4>
</div><!-- /footer -->
</div><!-- /page -->
<div data-role="page" id="page3">
<div data-role="header">
<h1>Third Page</h1>
</div><!-- /header -->
<div data-role="content">
<p>You are now on the third page.</p>
<p>Click <a href="#page2">here</a> to view the second page.</p>
<p>Click <a href="#page1">page 1</a> to go back to our parent page with id="page1"</p>
</div><!-- /content -->
<div data-role="footer">
<h4>Third Page Footer</h4>
</div><!-- /footer -->
</div><!-- /page -->
</body>
</html>
Please Whitelist JSFiddle in your content blocker.
Help keep JSFiddle free for always by one of two ways:
Whitelist JSFiddle in your content blocker (two clicks)
Go PRO and get access to additional PRO features →
Join the 4+ million users, and keep the JSFiddle dream alive.
Ad-free
All ads in the editor and listing pages are turned completely off.
Use pre-released features
You get to try and use features (like the Palette Color Generator) months before everyone else.
Fiddle collections
Sort and categorize your Fiddles into multiple collections.
Private collections and fiddles
You can make as many Private Fiddles, and Private Collections as you wish!
Console
Debug your Fiddle with a minimal built-in JavaScript console.