Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
The Geolocation API exposes an easy-to-use API. With only a couple of lines of code, you can obtain the user’s current position. What’s more, jQuery Mobile provides a simple framework for building a cross-browser mobile web application.
In this hack we will utilize the jQuery Mobile framework to provide a relatively simple means of authoring a cross-browser mobile application. Since this hack is focused on displaying our current longitude and latitude and exercising the API across the mobile web, we will only need a simple UI.
As always, we’ll start by building a basic page utilizing the
HTML5 <doctype> and including
our dependencies: