watch scroll position in div js 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;
}