get the position of scrollbar in javascript code example
Example: javascript get scroll position
function getYPosition(){
var top = window.pageYOffset || document.documentElement.scrollTop
return top;
}
function getYPosition(){
var top = window.pageYOffset || document.documentElement.scrollTop
return top;
}