Posted By

craigmoss on 10/02/11


Tagged

jquery mobile


Versions (?)

JQuery Mobile 1 Page BoilerPlate


 / Published in: jQuery
 

  1. <!DOCTYPE html>
  2. <html>
  3.  
  4. <head>
  5. <meta charset="utf-8">
  6. <meta name="viewport" content="width=device-width, initial-scale=1">
  7. <title>Single page template</title>
  8. <link rel="stylesheet" href="http://code.jquery.com/mobile/1.0rc1/jquery.mobile-1.0rc1.min.css" />
  9. <script src="http://code.jquery.com/jquery-1.6.4.min.js"></script>
  10. <script src="http://code.jquery.com/mobile/1.0rc1/jquery.mobile-1.0rc1.min.js"></script>
  11. </head>
  12.  
  13.  
  14. <body>
  15.  
  16. <div data-role="page">
  17.  
  18. <div data-role="header">
  19. <h1>Single page</h1>
  20. </div><!-- /header -->
  21.  
  22. <div data-role="content">
  23. <p>This is a single page boilerplate template that you can copy to build you first jQuery Mobile page. Each link or form from here will pull a new page in via Ajax to support the animated page transitions.</p>
  24. <p>Just view the source and copy the code to get started. All the CSS and JS is linked to the jQuery CDN versions so this is super easy to set up. Remember to include a meta viewport tag in the head to set the zoom level.</p>
  25.  
  26. <p>This template is standard HTML document with a single "page" container inside, unlike a <a href="multipage-template.html">multi-page template</a> that has multiple pages within it. We strongly recommend building your site or app as a series of separate pages like this because it's cleaner, more lightweight and works better without JavaScript.</p>
  27. </div><!-- /content -->
  28.  
  29. <div data-role="footer">
  30. <h4>Footer content</h4>
  31. </div><!-- /footer -->
  32.  
  33. </div><!-- /page -->
  34.  
  35. </body>
  36. </html>

Report this snippet  

You need to login to post a comment.