Book Image

Mastering jQuery Mobile

Book Image

Mastering jQuery Mobile

Overview of this book

Table of Contents (17 chapters)
Mastering jQuery Mobile
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Toolbars


Toolbars in jQuery Mobile are used to enhance the headers and footers of the pages. We have already used headers and footers in our page, so now it is time to make them a bit fancier and add some functionality to our app.

Toolbars is probably one of the easiest jQuery Mobile widgets to implement, especially if you already have a header or footer. To show how easy this is, we are going to change our existing header and footer sections into toolbars.

Before we get started, let's jot down our plan:

  1. Create a Home button in our header.

  2. Move our Events button from the content to our header.

  3. Stylize our Contact button in our footer to look like a toolbar button.

This doesn't seem like a whole lot of stuff to do, but it will make a beautiful difference in our mobile app. To begin, we'll create a Home button.

Creating a Home button

Keeping with the trend, we've been going with on this chapter, open up index.html and add the following code right under our initial header declaration:

<a href="index...