getScrollPosition
Returns the scroll position of the current page.
- Use
Window.pageXOffset
andWindow.pageYOffset
if they are defined, otherwiseElement.scrollLeft
andElement.scrollTop
. - Omit the single argument,
el
, to use a default value ofwindow
.