is there any way to distinguish whether the page is scrolling based on mousewheel or by dragging the scrollbar? I need to do different action for both.
is there any way to distinguish whether the page is scrolling based on mousewheel
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Looks like there are some existing plugins to deal with mousewheel events:
https://github.com/brandonaaron/jquery-mousewheel
These take the existing
onmousewheelevents and make them cross-browser, although I think recent versions of jQuery might already do this with themousewheelevent:$('#myselector').bind('mousewheel', function() { } );