O'Reilly logo

PhoneGap 4 Mobile Application Development Cookbook by Zainul Setyo Pamungkas

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

Persisting data between jQuery Mobile pages

In this recipe, we will build upon the podcast application built in the previous recipe, extending the functionality and features available for the user.

So far, our podcast application consists of a few simple pages that are independent of each other; that is, any content consumed by a page is used by that page only.

How to do it...

We will use the localStorage capabilities to save and retrieve information, causing it to persist across pages:

  1. With the list now populated, we need to revise the home method to include a function to capture the tap events on each list item. This will obtain the title, enclosure, and description attribute values from the selected item and set them in the localStorage on the ...

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