Skip to content
jQuery Mobile

Page Structure

Multi-page template with header, content, and footer roles.

#page#structure#layout

Code

jquery-mobile
<!DOCTYPE html>
<html>
<head>
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="https://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css">
  <script src="https://code.jquery.com/jquery-1.11.3.min.js"></script>
  <script src="https://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js"></script>
</head>
<body>
  <div data-role="page" id="home">
    <div data-role="header" data-position="fixed">
      <h1>Home</h1>
    </div>
    <div role="main" class="ui-content">
      <p>Welcome!</p>
      <a href="#about" class="ui-btn">About</a>
    </div>
    <div data-role="footer" data-position="fixed">
      <h4>Footer</h4>
    </div>
  </div>

  <div data-role="page" id="about">
    <div data-role="header"><h1>About</h1></div>
    <div role="main" class="ui-content">
      <p>About this app.</p>
      <a href="#home" data-direction="reverse" class="ui-btn">Back</a>
    </div>
  </div>
</body>
</html>