Calculate mouse wheel scroll speed using JavaScript

I need help calculating and calculating the scroll speed of a mouse wheel.

I want to detect when the user scrolls using their mouse wheel and how fast or slow they scroll.

Based on speed, I want to do some operations.

How can I find the scroll speed in the mouse?

+3


source to share


1 answer


I've looked into this before and there are three problems here.

  • Mouse speed fluctuates depending on how the browser reports it.
  • User preferences determine what impact each 'click' of scrolling has on the site.
  • There are some mice that don't 'click' and instead rotate freely, which gives weird numbers.


The combination of these three factors makes this useless metric useful. One person can scroll 5 times and be at the bottom of your site, and another 30 times and only advanced one paragraph.

+4


source







All Articles