Reputation: 1049
I am looking to setup jquery mobile with phone gap and perform a very simple task to see if it is working. This is what I have so far:
<!DOCTYPE html>
<html>
<head>
<title>Device Properties Example</title>
<script type="text/javascript" charset="utf-8" src="cordova.js"></script>
<script type="text/javascript" charset="utf-8" src="js/jquery.mobile.custom.js"></script>
<script type="text/javascript" charset="utf-8">
$(document).on('pageinit', function(){
$("#geolocation").html("Hey World");
});
</script>
</head>
<body>
<p id="geolocation">Finding geolocation...</p>
</body>
</html>
I want to change the contents of the p tag to "Hey World". I am very new to Phone Gap. Any advice would be great.
Upvotes: 0
Views: 77
Reputation: 1165
You're missing a number of references in your head section:
You also need to check the deviceready event for PhoneGap, unless you've done that on a page that was loaded by PhoneGap earlier. For example:
$(document).on("deviceready", function()
{
// phonegap ready
}
Upvotes: 1