code: function() {
              var applyTouchMove = function(difference_x, difference_y) {
                  $this.scrollTop($this.scrollTop() - difference_y);
                  $this.scrollLeft($this.scrollLeft() - difference_x);
  
                  // update bar position
                  updateBarSizeAndPosition();
              };
  
              var start_coords = {},
                  start_time = 0,
                  speed = {},
                  breaking_process = null;
  
              $this.bind("touchstart.perfect-scroll", function(e) {
                  var touch = e.originalEvent.targetTouches[0];
  
                  start_coords.pageX = touch.pageX;
                  start_coords.pageY = touch.pageY;
  
                  start_time = (new Date()).getTime();
  
                  if (breaking_process !== null) {
                      clearInterval(breaking_process);
                  }
              });
              $this.bind("touchmove.perfect-scroll", function(e) {
                  var touch = e.originalEvent.targetTouches[0];
  
                  var current_coords = {};
                  current_coords.pageX = touch.pageX;
                  current_coords.pageY = touch.pageY;
  
                  var difference_x = current_coords.pageX - start_coords.pageX,
                      difference_y = current_coords.pageY - start_coords.pageY;
  
                  applyTouchMove(difference_x, difference_y);
                  start_coords = current_coords;
  
                  var current_time = (new Date()).getTime();
                  speed.x = difference_x / (current_time - start_time);
                  speed.y = difference_y / (current_time - start_time);
                  start_time = current_time;
  
                  e.preventDefault();
              });
              $this.bind("touchend.perfect-scroll", function(e) {
                  breaking_process = setInterval(function() {
                      if(Math.abs(speed.x) < 0.01 && Math.abs(speed.y) < 0.01) {
                          clearInterval(breaking_process);
                          return;
                      }
  
                      applyTouchMove(speed.x * 30, speed.y * 30);
  
                      speed.x *= 0.8;
                      speed.y *= 0.8;
                  }, 10);
              });
          }
docs: bind mobile touch handler