como saber roll js real
// horizontal scrolling amount
window.pageXOffset
// vertical scrolling amount
window.pageYOffset
Old-fashioned Ostrich
// horizontal scrolling amount
window.pageXOffset
// vertical scrolling amount
window.pageYOffset