Advertisement
Guest User

walking.js

a guest
Aug 30th, 2013
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. document.addEventListener("deviceready", function(){
  3.  
  4.     $(document).ready(function() {
  5.         console.log('walking.html loaded');
  6.  
  7.         $('.people').click(function(){
  8.             // TODO
  9.             // check to see if in walk, and warn
  10.             // if switch page canel walk/delete
  11.             window.location = 'index.html';
  12.             // steroids.layers.pop();
  13.         });
  14.  
  15.  
  16.  
  17.         $('.details-map-slider').iosSlider({
  18.            snapToChildren: true,
  19.            desktopClickDrag: true,
  20.            onSlideComplete: app.cb_slide_change,
  21.         });
  22.         console.log('Slider started.');
  23.  
  24.         app.start_slidenation();
  25.  
  26.  
  27.  
  28.         app.start_walk();
  29.  
  30.  
  31.  
  32.         $('.stop').click(function(){
  33.             app.stop_walk();
  34.         });
  35.  
  36.         $('.pause').click(function(){
  37.             if ($(this).hasClass('grey')) {
  38.                 app.pause_walk();
  39.             } else {
  40.                 app.resume_walk();
  41.             }
  42.  
  43.             $(this).toggleClass('grey orange');
  44.             if ($(this).find('h4').hmtl() == 'Pause') {
  45.                 $(this).find('h4').hmtl('Resume');
  46.             } else {
  47.                 $(this).find('h4').hmtl('Pause');
  48.             };
  49.         });
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.     // END DEVICE READY
  61.     });
  62.  
  63. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement