You really don't want to do this on onscroll . Consider that onscroll is actually nothing but an event that says "pageview is moving."
This does not mean that they use the mouse wheel to do this.
On the phone, your plan might make sense: then it would be like making the drag and drop movement equal to the swipe movement. Fine.
My preferred method for scrolling through the menu is to click on the middle mouse button, and then place the cursor just below the anchor point, so that I can read each block of text as it scrolls past the screen.
I donβt even need a hand on the mouse, for long blocks.
So, in my case, onscroll will fire for about 60 events / sec, and if you automatically skip articles, I'm going to teleport through all the content on your site.
Other people are still dragging the actual scrollbar.
Listening to the mouse wheel and keys (up / down, pg-up / pg-down), and not just any way to move the page, is safer ...... but you are sure that all articles are going to be small enough to fit all the content to all browser windows, even at silly-low resolutions (iPhone 3)?
Because if people need to scroll to read content, then suddenly you are dealing with a much more complex solution:
You will have to listen to the usual (or customized) scroll requests of any type in order to access the bottom of the current content ...... and then you will have to provide the user with some sort of visual queue, which they are now at the very bottom of the content and continue use the trigger method (swipe / drag / keys / mwheel) to switch articles.
The first two are beautiful ...... make you feel spring-loaded, like smartphones.
... what about the other two, where people can expect them to hit them several times per second to get where they are going?
Norguard
source share