get scroll position element 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;
}