From the course: jQuery Mobile Essential Training

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Navigation bars

Navigation bars - jQuery Mobile Tutorial

From the course: jQuery Mobile Essential Training

Start my 1-month free trial

Navigation bars

Let's finish up our chapter on toolbars by taking a look at navigation bars. And you've probably seen navigation bars. These are the navigation elements you seen in applications that have side by side buttons that let you quickly change categories. So we're going to build one of those, using toolbars in jQuery Mobile, along with a new data structure called the navbar. So here in Chapter Four, in my snippets, I've scrolled down to the navigation bar section, and let's open up navbar_start. And you can see here that we've got two pages. This first page here, second page here, each one of them has a data roll of page applied. And each one has a header and some content, so what I'm going to do is in the snippets, I'm going to copy this structure right here, and it's a navigation element, which is a new HTML 5 element right here, and I have a data role of navbar applied as an attribute, and that's going to tell jQuery Mobile that this is a navigation bar. So let's copy this one, and paste…

Contents