Make Div Scroll All The Way To The Top
Briefly

The problem with scrolling the gray div to the top of the page lies in the current implementation of the swipe gesture, which only achieves partial scrolling and stops before reaching the desired position. For optimal performance, the amount of scroll should be adjusted to cover the full distance to the bottom of the banner div with a single swipe up. By recalibrating the scroll amount value, you can ensure that the div touches the banner as intended upon a single swipe.
The issue arises from the scroll function's behavior when swiping up. The current implementation only scrolls the gray div halfway, requiring multiple swipes for the desired effect.
To ensure the gray div scrolls to the top of the page until it reaches the bottom of the banner div, modify the scroll amount in the swipe event.
Read at SitePoint Forums | Web Development & Design Community
[
|
]