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.

43 lines
2.1 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.0/jquery.mobile-1.0.min.css">
  7. <script src="http://code.jquery.com/jquery-1.6.4.min.js"></script>
  8. <script type="text/javascript" src="http://code.jquery.com/mobile/1.0/jquery.mobile-1.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>Examples of various transition effects when switching to a new page.</p>
  18. <p>Go to the <a href="#page2" data-transition="slide">second page</a> with a slide.</p>
  19. <p>Go to the <a href="#page2" data-transition="slideup">second page</a> with a slide up.</p>
  20. <p>Go to the <a href="#page2" data-transition="slidedown">second page</a> with a slide down.</p>
  21. <p>Go to the <a href="#page2" data-transition="pop">second page</a> with a pop.</p>
  22. <p>Go to the <a href="#page2" data-transition="fade">second page</a> with a fade.</p>
  23. <p>Go to the <a href="#page2" data-transition="flip">second page</a> with a flip.</p>
  24. </div>
  25. <div data-role="footer">
  26. <h4>mobilexweb.com</h4>
  27. </div>
  28. </div>
  29. <div data-role="page" id="page2" data-title="This is the second page" data-add-back-btn="true" data-back-btn-theme="b">
  30. <div data-role="header">
  31. <h1>Second page</h1>
  32. </div>
  33. <div data-role="content">
  34. <p>This is the main content of the second page.</p>
  35. <p>You can go back using the header's button, <a href="#page1">clicking here</a>
  36. or using your browser's back button.</p>
  37. </div>
  38. <div data-role="footer">
  39. <h4>mobilexweb.com</h4>
  40. </div>
  41. </div>
  42. </body>
  43. </html>