In JavaScript I am looking for a moment when user scrolls to some <div>
. Then I want to stop user's inertial scrolling and scroll to some another object via script.
How can I stop the scrolling which has already started?
So I want something like this:
$('#selector').stopScrolling().scrollTo('#another_object');
I know that $('#selector').stop()
stops animations, but it seems like it can't help me there