jQuery Mobile: Navigation bar and header in swatch b

This entry is part 55 of 73 in the series jQuery Mobile

As a navigation bar, it might actually be better to use a different theme to differentiate it from the rest of the page.

A swatch is a combination or a collection of colors.  When they are combined together, it becomes a theme.

Here we use swatch b for the header and the navigation bar.

Navigation Bar
    <link href='http://code.jquery.com/mobile/1.4.1/jquery.mobile-1.4.1.min.css' rel='stylesheet'/>
    <script src='http://code.jquery.com/jquery-1.10.2.min.js'></script>
    <script src='http://code.jquery.com/mobile/1.4.1/jquery.mobile-1.4.1.min.js'></script>
<div data-role='page'>
    <div data-role='header' data-theme='b'>
        <h1>Welcome To My Mobile App</h1>
    <div class='ui-body-b ui-body'>
        <div data-role='navbar'>
                <li><a href='#' data-icon='grid'>A</a></li>
                <li><a href='#' data-icon='star'>B</a></li>
                <li><a href='#' data-icon='gear'>C</a></li>
                <li><a href='#' data-icon='arrow-l'>D</a></li>
                <li><a href='#' data-icon='arrow-r'>E</a></li>
        </div><!-- /navbar -->

    <div data-role='content'>
        <p>You can put your content here...</p>

    <div data-role='footer' data-position='fixed'>
        <h4 style='text-align:center;'>I'm the footer</h4>

Try The Code

For the header, we have used data-theme=’b’ and for the navigation bar, we have used class=’ui-body-b’,

Series Navigation<< jQuery Mobile: Navigation bar icon positioning
jQuery Mobile: A basic popup >>