I’ve come close with this but the solutions I’ve seen aren’t quite nailing it.
I know how to animate a scroll to the top of a page, and I also know how to trigger that when a user has scrolled down to a certain depth, but what I’m struggling to build, is a way to allow the user scroll past that certain depth (say, 1000px) but the second they release the scroll bar, the bottom of the viewable portion animates back up to the 1000px mark.
The closest solution I’ve seen hijacks the user’s view the instant the scroll bar crosses the 1000px threshold, and tries to animate back immediately, but because the user is still dragging, the animation is triggered again and again and so on. This is horribly jerky and confusing.
The key is the delay in waiting for the user to disengage the scroll bar before the view animates back up.
Is there any simple way in jquery to do this?