Skip to content
jQuery Mobile

Toolbars

Fixed header and footer bars with fullscreen tap-to-toggle mode.

#header#footer#toolbars

Code

jquery-mobile
<div data-role="page" id="page1">
  <!-- Fixed header with left/right buttons -->
  <div data-role="header" data-position="fixed" data-theme="b">
    <a href="#" data-icon="home" data-iconpos="notext">Home</a>
    <h1>Title</h1>
    <a href="#" data-icon="gear" class="ui-btn-right">Options</a>
  </div>

  <div role="main" class="ui-content">
    <p>Scroll to see fixed toolbars stay put.</p>
    <p>...</p>
  </div>

  <div data-role="footer" data-position="fixed" data-theme="b">
    <h4>Footer Text</h4>
  </div>
</div>

<!-- Fullscreen toolbars: tap the page to show/hide them -->
<div data-role="page" id="page2">
  <div data-role="header" data-position="fixed" data-fullscreen="true">
    <h1>Fullscreen</h1>
  </div>
  <div role="main" class="ui-content">
    <p>Tap to toggle bars.</p>
  </div>
  <div data-role="footer" data-position="fixed" data-fullscreen="true">
    <h4>FS Footer</h4>
  </div>
</div>