code: function() {
              var shouldPreventDefault = function(deltaX, deltaY) {
                  var scrollTop = $this.scrollTop();
                  if(scrollTop === 0 && deltaY > 0 && deltaX === 0) {
                      return !settings.wheelPropagation;
                  }
                  else if(scrollTop >= content_height - container_height && deltaY < 0 && deltaX === 0) {
                      return !settings.wheelPropagation;
                  }
  
                  var scrollLeft = $this.scrollLeft();
                  if(scrollLeft === 0 && deltaX < 0 && deltaY === 0) {
                      return !settings.wheelPropagation;
                  }
                  else if(scrollLeft >= content_width - container_width && deltaX > 0 && deltaY === 0) {
                      return !settings.wheelPropagation;
                  }
                  return true;
              };
  
              $this.mousewheel(function(e, delta, deltaX, deltaY) {
                  $this.scrollTop($this.scrollTop() - (deltaY * settings.wheelSpeed));
                  $this.scrollLeft($this.scrollLeft() + (deltaX * settings.wheelSpeed));
  
                  // update bar position
                  updateBarSizeAndPosition();
  
                  if(shouldPreventDefault(deltaX, deltaY)) {
                      e.preventDefault();
                  }
              });
          }
docs: bind handlers