Elements to Build

In the previous chapter, you built the database structure that holds the wines and wineries in the system. In this chapter, you build the Find tab, the geolocation, and AJAX elements that will enable you to interact with the user’s location and surrounding venues.

Creating the Find tab

Since you already defined the top navigation structure with the Find tab, you just need to build the page containing the map and other geolocation elements. Start with the following steps:

1. Open your text editor of choice and start editing in the index.html file.

2. In index.html, after the close of the <div> for the Manage tab, add the following structure for the Find tab. The markup for this tab is the same as for the Activity tab, but with ID=“find” which allows the page transitions to work properly.

<div id=”find” data-role=”page”>

<div data-role=”header”>


<div data-role=”navbar” data-iconpos=”bottom”>


<li><a data-icon=”star href=”#activity”>Activity</a></li>

<li><a data-icon=”grid” href=”#manage”>Manage</a></li>

<li><a data-icon=”info” “ class=”ui-btn-active”


<li><a data-icon=”gear” href=”#settings”>Settings</a></li>

<li><a data-icon=”search” href=”#search”>Search</a></li>


</div><!-- /navbar -->

</div><!-- /header -->

<div data-role=”content”>


</div><!-- /content -->


3. When using Google Maps in elements that are set to be hidden or not viewable, sometimes you deal with issues ...

Get Smashing Mobile Web Development now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.