Home | History | Annotate | Download | only in data
      1 <html>
      2 <title>Title: 0</title>
      3 <style>
      4 
      5 .large {
      6   width: 300px;
      7   height: 100px;
      8   background-color: red;
      9   margin: 300px;
     10 }
     11 
     12 </style>
     13 
     14 <div name='0' class='large'></div>
     15 <div name='1' class='large'></div>
     16 <div name='2' class='large'></div>
     17 <div name='3' class='large'></div>
     18 <div name='4' class='large'></div>
     19 <div name='5' class='large'></div>
     20 <div name='6' class='large'></div>
     21 <div name='7' class='large'></div>
     22 <div name='8' class='large'></div>
     23 <div name='9' class='large'></div>
     24 
     25 <script>
     26 
     27 function get_current() {
     28   if (location.hash.length == 0)
     29     return 0;
     30   return parseInt(location.hash.substr(1));
     31 }
     32 
     33 function navigate_next() {
     34   var current = get_current();
     35   current = (current + 1) % 10;
     36   location.hash = "#" + current;
     37 }
     38 
     39 function navigate_prev() {
     40   var current = get_current();
     41   current = (current + 9) % 10;
     42   location.hash = "#" + current;
     43 }
     44 
     45 function touch_start_handler() {
     46 }
     47 
     48 function install_touch_handler() {
     49   document.addEventListener('touchstart', touch_start_handler);
     50 }
     51 
     52 function uninstall_touch_handler() {
     53   document.removeEventListener('touchstart', touch_start_handler);
     54 }
     55 
     56 onload = function() {
     57   window.onhashchange = function() {
     58     document.title = "Title: " + location.hash;
     59   }
     60 }
     61 
     62 </script>
     63 
     64 </html>
     65