Allows GSAP to animate the scroll position of the window (like doing window.scrollTo(x, y)) or a <div> DOM element (like doing myDiv.scrollTop = y; myDiv.scrollLeft = x;). To scroll the window to a particular position, use window as the target of the tween like this:
//scroll to 400 pixels down from the top
gsap.to(window, {duration: 2, scrollTo: 400});
//or to scroll to the element with the ID "#someID":
gsap.to(window, {duration: 2, scrollTo:"#someID"});
//or to specify which axis
Animates the scroll position of the window or a DOM element.