Advertisement
KzDrew

sandbox_slider.htm

Aug 7th, 2013
415
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5 3.62 KB | None | 0 0
  1. <html>
  2. <head>
  3.  
  4. <style type="text/css">
  5.  
  6. </style>
  7.  
  8.  
  9. <!-- load the css used by the jquery-mobile library -->
  10. <link rel="stylesheet" href="http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.css" />
  11.  
  12.  
  13.  
  14. <!-- load the jquery library -->
  15. <script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
  16.  
  17. <!-- load the js that binds to various jqm events here, BEFORE loading jqm -->
  18. <script src="sandbox_slider.js"></script> // can be obtained from: http://pastebin.com/iQsagrmt
  19.  
  20. <!-- load the jquery-mobile (jqm) library -->
  21. <script src="http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.js"></script>
  22.  
  23.  
  24. </head>
  25. <body>
  26.  
  27.  
  28.  
  29.  
  30.  
  31. <!-- all css, script, and page content for this page GO INSIDE THIS DIV
  32.     Caution: any script is executed each time the page is displayed (cached or new)
  33.              so this is not a good place to bind events
  34. -->
  35. <div data-role="page" id="example_page_one" data-theme="b" data-content-theme="b">
  36.  
  37.     <div data-role="header" data-position="fixed">
  38.     <h1>Fixed Header!</h1>
  39.     </div>
  40.  
  41.     <style type="text/css">
  42.         .example1 {color: red;}
  43.     </style>
  44.  
  45.     <p>This is the content for <span class="example1">example page one</span>!</p>
  46.  
  47.     <p>A link to <a href="#example_page_two">example page two</a></p>
  48.  
  49.     <p>A link to <a href="#example_page_three">example page three</a></p>
  50.  
  51.     <div style="float:left" data-role="fieldcontain">
  52.     <label for="slider-fill_page1">Input slider:</label>
  53.     <input type="range" name="slider-fill_page1" id="slider-fill_page1" min="0" max="100" data-highlight="true" />
  54.     </div>
  55.  
  56.     <div data-role="footer" data-position="fixed">
  57.     <h1>Fixed Footer!</h1>
  58.     </div>
  59.  
  60.     <script>
  61.         console.log('script in the content area of #example_page_one');
  62.         /*
  63.         Strange Behavior Note:
  64.           js code placed here will get executed:
  65.           -- JUST ONCE if this is the very first page that is loaded and never again when returning to this page
  66.           -- EVERY TIME this page is displayed if this page was NOT the very first page that was loaded
  67.         */
  68.         // .. do stuff here
  69.     </script>
  70.  
  71.  
  72. </div>
  73.  
  74.  
  75. <div data-role="page" id="example_page_two" data-theme="b" data-content-theme="b">
  76.  
  77.     <div data-role="header" data-position="fixed">
  78.     <h1>Fixed Header!</h1>
  79.     </div>
  80.  
  81.     <!-- note that the example1 css style does not exist in this page because it was defined in
  82.         the page content area for example page 1. -->
  83.  
  84.     <p>This is the content for <span class="example1">example page two</span>!</p>
  85.  
  86.     <p>A link to <a href="#example_page_one">example page one</a></p>
  87.  
  88.     <p>A link to <a href="#example_page_three">example page three</a></p>
  89.  
  90.     <div data-role="footer" data-position="fixed">
  91.     <h1>Fixed Footer!</h1>
  92.     </div>
  93.  
  94.     <script>
  95.         console.log('script in the content area of #example_page_two');
  96.         // .. do stuff here
  97.     </script>
  98.  
  99.  
  100. </div>
  101.  
  102.  
  103. <div data-role="page" id="example_page_three" data-theme="b" data-content-theme="b">
  104.  
  105.     <div data-role="header" data-position="fixed">
  106.     <h1>Fixed Header!</h1>
  107.     </div>
  108.  
  109.  
  110.     <!-- note that the example1 css style does not exist in this page because it was defined in
  111.         the page content area for example page 1. -->
  112.  
  113.     <p>This is the content for <span class="example1">example page three</span>!</p>
  114.  
  115.     <p>A link to <a href="#example_page_one">example page one</a></p>
  116.  
  117.     <p>A link to <a href="#example_page_two">example page two</a></p>
  118.  
  119.     <div data-role="footer" data-position="fixed">
  120.     <h1>Fixed Footer!</h1>
  121.     </div>
  122.  
  123.     <script>
  124.         console.log('script in the content area of #example_page_three');
  125.         // .. do stuff here
  126.     </script>
  127.  
  128.  
  129. </div>
  130.  
  131.  </body>
  132. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement