O'Reilly logo

jQuery Mobile Cookbook by Chetan K Jain

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using $.mobile.path utility methods

This recipe shows you how to use the utility methods provided by the $.mobile.path object in your app.

Getting ready

Copy the full code of this recipe from the code/09/path source folder. You can launch this code by using the URL: http://localhost:8080/09/path/main.html.

How to do it...

  1. Create the main.html page with four anchor links, as shown in the following code snippet:
    <div data-role="content"> <div id="msgdiv"></div> <a href="http://localhost:8080/09/base/main.html" data-role="button"> 1: http://localhost:8080/09/base/main.html </a> <a href="http://localhost:8080/09/base/" data- role="button"> 2: http://localhost:8080/09/base/ </a> <a href="page1.html" data-role="button"> 3: page1.html </a> <a href="../" data-role="button">4: ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required