I would like to make a differenciation between three cases :
e.preventDefault();
if(Mousewheel.direction = Left)
base.goForward();
else if(Mousewheel.direction = Right)
base.goBack();
else{
//Doing normal slide
But I can't find anything indicating if the mousewheel is horizontal or vertical, the only returns of the plugin Mousewheel, being delta and event.
If someone knows how i could make a differenciation between horizontal and vertical wheeling, thanks for sharing your tips.
UPDATE: I tested it with my laptops pad and event.originalEvent.wheelDeltaX
is indeed your answer.
Using some javascript debugging tools, place a breakpoint into the event handler and examine the event object.
There are some interesting properties there like event.originalEvent.wheelDeltaX
and event.originalEvent.wheelDeltaY
. I don't have a mouse with horizontal scrolling to test it but possibly this is your solution.
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