I'm developing an iPhone application with HTML5, CSS, and jQuery using PhoneGap. However, there seem to be some problems with either my understanding of PhoneGap or the MWE.
I used following code from codeforest.net:
<!DOCTYPE html>
<html>
<head>
<title>jQuery Mobile Tutorial on Codeforest.net</title>
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.0a1/jquery.mobile-1.0a1.min.css" />
<script src="http://code.jquery.com/jquery-1.4.3.min.js"></script>
<script src="http://code.jquery.com/mobile/1.0a1/jquery.mobile-1.0a1.min.js"></script>
</head>
<body>
<!-- Start of first page -->
<div data-role="page" id="first">
<div data-role="header">
<h1>First</h1>
</div><!-- /header -->
<div data-role="content">
<p>The content</p>
<p>View internal page called <a href="#second">second</a></p>
</div><!-- /content -->
<div data-role="footer">
<h4>Page Footer</h4>
</div><!-- /footer -->
</div><!-- /page -->
<!-- Start of second page -->
<div data-role="page" id="second">
<div data-role="header">
<h1>Second</h1>
</div><!-- /header -->
<div data-role="content">
<p>I'm the second content</p>
<p><a href="#first">Back to first</a></p>
</div><!-- /content -->
<div data-role="footer">
<h4>Page Footer</h4>
</div><!-- /footer -->
</div><!-- /page -->
</body>
</html>
Starting the code in its separate file will result in the wanted behavior (only shows first div with id="first", when clicking on the link the second page is loaded with a back button on top).
I thought I could just use PhoneGap to convert this HTML/CSS/JS example to working iOS application.
The problem I had from the beginning was that I want to have several different .html files, which reference each other. This works, but has the problem that no native back-button is shown in the header.