kswedberg / jquery-smooth-scroll

Automatically make same-page links scroll smoothly
MIT License
1.97k stars 427 forks source link

Disable mouse wheel while page is scrolling #73

Closed skynet closed 8 years ago

skynet commented 9 years ago

With smoothScroll event, for example on a "go to top" click, if mouse wheel rotates a flickering happens. Is it possible to disable mouse wheel during smooth-scrolling?

kswedberg commented 9 years ago

Have you tried to do this by using the beforeScroll and afterScroll callback options? I haven't worked with mouse wheel behavior before, but maybe you could bind a listener in the beforeScroll callback to prevent the default mousewheel event from firing and then unbind the listener in the afterScroll callback.