How to Move Javascript Content With the Scroll Bar
- 1). Right-click the HTML page that contains the scrolling information you want to set. Click "Open With" and select your HTML or JavaScript editor.
- 2). Create a JavaScript variable that points to the scroll bar object. Add the following JavaScript statement to your script:
var scrollbar = element.scrollTop; - 3). Set the location of the scroll bar. For instance, if you want to scroll down 20 pixels, set the scroll bar element to "20." The following code shows you how to scroll the content:
scrollbar = 20; - 4). Save the changes and open the Web page in your browser to test the new scroll bar settings.
Source...