Desktop browsers fire scroll events continuously while the window is scrolled. Mobile devices generally fire an event once, at the end of the scroll.
I am doing some fancy stuff which only works if I can get the continuous scroll events - otherwise it just looks nasty. It would be trivial to just bypass this and implement a mobile-friendly version in single-scroll-event browsers but how can I detect whether a browser emits a single scroll event or continuous scroll events?
It seems my only option is to sniff the browser and disable this feature for mobile - which means probably disabling it in the few mobile browsers that support continuous scroll events - or leaving it enabled and allowing it to look a bit crappy in the single-event browsers.
If i am correctly understand your question. so my advice is create a variable and increase its values with + 1 everytime and alert it in your function which called on scroll. create variable out of function
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With