Working with the contact database, developers can easily obtain a full array of all Contact
objects saved on the device. We want to be able to obtain and view the saved contact information for specific individuals if we choose to drill down and filter a certain contact from the database.
For this recipe, we'll build on the code created in the previous recipe, Listing all available contacts. This will give us a head start to add more functionality to the application. Therefore, if you haven't yet completed the previous recipe, Listing all available contacts, it may help to complete it first.
To manage the selected contact information, we will first make use of the localStorage
API available and harness some more power from the jQuery Mobile framework:
When the user selects a contact from the list, we want to take them to a new page to show the details. Let's add a new page to
index.html
below the current one...