Footer Buttons

Description

There are three styles of buttons you may add to a footer. They include:

  • A button with only text. A normal link within the footer will display as a text-only button: <a href="#">Sync</a>
  • A button with only an icon. An icon-only button requires the addition of two attributes, data-icon and data-iconpos="notext": <a href="#" data-icon="plus" data-iconpos="notext"></a>
  • A button with text and an icon. This style of button works well within a tab bar: <a href="#" data-icon="home">Home</a>

Example


<!DOCTYPE html>
<html>
<head>
<script type='text/javascript'
  src='http://code.jquery.com/jquery-1.6.4.js'></script>
<link rel="stylesheet" type="text/css"
  href="http://code.jquery.com/mobile/1.0.1/jquery.mobile-1.0.1.min.css">
<script type='text/javascript'
  src="http://code.jquery.com/mobile/1.0.1/jquery.mobile-1.0.1.min.js"></script>
<style type='text/css'>
.ui-footer .ui-navbar .ui-btn-active {<!-- w w w.  j a va  2s .c o  m-->
  border: 1px solid red;
  background: #333333;
  font-weight: bold;
  color: #fff;
  text-shadow: 0 -1px 1px #000;
}
</style>
</head>
<body>
  <div id="testPage" data-role="page" data-theme="a">
    <div data-role="content">Test</div>
    <div data-role="footer">
      <div data-role="navbar">
        <ul>
          <li><a href="#" onclick="">Test1</a></li>
          <li><a href="#" onclick="">Test2</a></li>
        </ul>
      </div>
    </div>
  </div>
</body>
</html>

Click to view the demo





















Home »
  jQuery Mobile »
    Tutorial »




jQuery_Mobile
Form
List
Layout
Theme