Skip to content
Advertisement

Binding touch and scroll to wheel event

I have this code for vehicle to horizontal and back to vertical scrolling, however it only works on mouse wheel scroll. I also need it to respond accordingly to mobile touch, scrollbars, page up/down, and the keyboard arrow keys. Below is my code:

JavaScript
JavaScript
JavaScript

How can I make this work for mobile touch, scroll bar, arrow keys, and page up/down?

Thanks

Advertisement

Answer

My solution was to use the scroll event, it works on all devices:

JavaScript
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement