I will try to be as short as possible.
I'm trying to make a scrolling pattern as NY Times website have on single articles: http://www.nytimes.com/2014/09/27/world/europe/british-parliament-vote-isis-airstrikes.html for example.
When you go down in the article, only the top bar remain sticky. Then, after you go down enough, and scroll up fast, the recommended articles bar appear:
But, the fun part is that the bar doesn't appear if you scroll up slow.
So, I was thinking of using the jQuery Waypoints plugin, which can tell me the direction of scrolling, but this way, anytime I scroll up, the recommended news bar will appear and I don't need this.
I don't know exactly how to do the mathematical function which will tell me that the up scroll was fast enough to show the bar.
Any ideas?