I am trying to develop a Phonegap (1.3) app on Android (2.1) with jQuery Mobile (1.0).
I am using an example from an book (Pro jQuery Mobile) and it works on Firefox, but not on Google Chrome or inside the android emulator and I would like to know why this doesn’t work.
The code of the first page (“index.html”) is:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Hijax Example</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.css" />
<script src="http://code.jquery.com/jquery-1.6.4.min.js"></script>
<script src="http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.js"></script>
</head>
<body>
<!-- First Page -->
<div data-role="page">
<div data-role="header"><h1>Hijax Page</h1></div>
<div data-role="content">
<a href="contact.html" data-role="button">Contact Us</a>
</div>
</div>
</body>
</html>
The code of the second page (“contact.html”) is:
<div data-role="page">
<div data-role="header">
<h1>Contact Us</h1>
</div>
<div data-role="content">
Contact information
</div>
</div>
What I get is the “Error loading page” from jQuery.
It works now on Android emulator. The reason it didn’t work was that I included a wrong version of Phonegap. I forgot that phonegap-1.3.0.js is platform dependend and we included the version for Windows Phone and not for Android.
Unfortunately it still doesn’t work on Chrome.