Learning by doing: Reading books and trying to understand the (code) examples
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
1.5 KiB

  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8" />
  5. <title>My first jQuery Mobile code</title>
  6. <link rel="stylesheet" href="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.css">
  7. <script src="http://code.jquery.com/jquery-1.8.2.min.js"></script>
  8. <script type="text/javascript" src="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.js"></script>
  9. <meta name="viewport" content="width=device-width, initial-scale=1">
  10. </head>
  11. <body>
  12. <div data-role="page" id="page1">
  13. <div data-role="header">
  14. <h1>First page</h1>
  15. </div>
  16. <div data-role="content">
  17. <p>This is the main content of the page.</p>
  18. <p>You can go to the <a href="#page2">second page</a>.</p>
  19. </div>
  20. <div data-role="footer">
  21. <h4>mobilexweb.com</h4>
  22. </div>
  23. </div>
  24. <div data-role="page" id="page2" data-title="This is the second page" data-add-back-btn="true" data-back-btn-theme="b">
  25. <div data-role="header">
  26. <h1>Second page</h1>
  27. </div>
  28. <div data-role="content">
  29. <p>This is the main content of the second page.</p>
  30. <p>You can go back using the header's button, <a href="#page1">clicking here</a>
  31. or using your browser's back button.</p>
  32. </div>
  33. <div data-role="footer">
  34. <h4>mobilexweb.com</h4>
  35. </div>
  36. </div>
  37. </body>
  38. </html>