Checks whether an element is at the top of its scroll range.
Uses <= 0 rather than strict equality to account for elastic overscroll on iOS.
<= 0
Scrollable element to inspect.
true when the element is at the top of its scroll range.
true
atScrollTop(scrollable); // true when scrollTop <= 0 Copy
atScrollTop(scrollable); // true when scrollTop <= 0
Checks whether an element is at the top of its scroll range.
Uses
<= 0rather than strict equality to account for elastic overscroll on iOS.