How do I make this scroll function work on jQuery?
I'm trying to implement this scroller function, and it should work, but when I try, it is giving me a syntax error. Can someone tell me why/how to fix it?

    Scroller = function(element) {
      this.element = this;
      this.startTouchY = 0;
      this.animateTo(0);
    
      element.addEventListener('touchstart', this, false);
      element.addEventListener('touchmove', this, false);
      element.addEventListener('touchend', this, false);
    }
I'm sure I have to change `Scroller = function(element)`, but I don't know to what.
How do I make this scroll function work on jQuery?
===

I'm trying to implement this scroller function, and it should work, but when I try, it is giving me a syntax error. Can someone tell me why/how to fix it?

    Scroller = function(element) {
      this.element = this;
      this.startTouchY = 0;
      this.animateTo(0);
    
      element.addEventListener('touchstart', this, false);
      element.addEventListener('touchmove', this, false);
      element.addEventListener('touchend', this, false);
    }
I'm sure I have to change `Scroller = function(element)`, but I don't know to what.