Moving ScrollBar Vertical position by a specified number of pixels
Posted: 16 Nov 2014, 11:17
Hi
How can I move the window scrollbar vertical position up or down by a specified number of pixels?
I'm using this function to get the scrollbar vertical position.
How can I move the window scrollbar vertical position up or down by a specified number of pixels?
I'm using this function to get the scrollbar vertical position.
Code: Select all
// function to get scrollbar vertical position
function scrollY() {
return window.pageYOffset ? window.pageYOffset : document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop;
}