You just have to have set up either a jsScroller, or jsScrollbar object.


new jsScrollerTween(jsScroll, trackTween);

jsScroll can be an instance of jsScroller or jsScrollbar. trackTween is a boolean value that sets whether or not the jsScrollbar will use the tween when the track is clicked.

An example of implementation:

var wrapper = document.getElementById("Scroller");
var barWrapper = document.getElementById("Scrollbar-Container");

var scroller = new jsScroller(wrapper, 400, 200);
var scrollbar = new jsScrollbar(scroller, barWrapper, true);

//use it with the scrollbar, enable track tweening
var scrollTween = new jsScrollerTween(scrollbar, true);


You should take note, when using these methods, use them with the original jsScrollbar or jsScroller object that was passed. Dont't use them with the jsScrollTween object. The jsScrollTween object just adds more functions to the original object.


Tweens to the specified y coordinate


Tweens by a specified amount.

//Tween to the y coordinate 126
//notice I'm using "scrollbar" not "scrollTween"

//Tween up 50px




None that I know of...

Useful Properties

These are properties that you can access that may help you in making scripts:


This lets you change the tweening steps so you can create your own animation. The steps are defined by the percent of the total distance the tween must travel.

// gradual acceleration and deceleration
scrollTween.steps = 

//Rapid deceleration, this is the default
scrollTween.steps = [0,25,50,70,85,95,97,99,100];

//Straight movement
scrollTween.steps = [0,10,20,30,40,50,60,70,80,90,100];

//Rapid deceleration with a bounce at the end
scrollTween.steps = [0,25,50,70,85,95,100,105,101,97,100,99,100];


Boolean value that is true when it's not in the middle of an animation.


The time between the steps in milliseconds. Default is 40.