I am building a website and in this website I have an event on my mousewheel. The problem is that when you scroll your mouse on a mac (with a magic mouse) the scroll event is called so many times that at one moment the scroll function will totally freak out and isn’t smooth anymore.
Does anyone know how you can tackle this problem?
I already tried to check the e.orginalEvent but it always returns DOMMouseWheel.
Also on a PC you don’t have this problem and with an other mouse then the magic mouse it works great.
Thanks
Sounds like you need the debounce/throttle plugin here http://benalman.com/projects/jquery-throttle-debounce-plugin/ .
It allows you set up events to fire only after a certain period like 1 second. This way your page Isn’t flooded with mousewheel events or if someone thinks clicking the submit button of a form a MILLION times will make it submit faster…