Hello the community
I’ve design an horizontal scrolling website, but during a user test I saw that the user tried to use mouse or trackpad horizontal scrolling, while only vertical scroll alow to scroll horinzontally. So I will like to convert the horizontal scroll to vertical to fix that issue. Any genuis know a way to do that?
My read-only link
Thank you for your help
I’ve already searched into previous posts, but no one get an anwser…
I’ve found the solution, paste that body coustom page code
<script>
document.addEventListener('wheel', function(event) {
if (Math.abs(event.deltaX) > Math.abs(event.deltaY)) {
window.scrollBy(0, event.deltaX);
} else {
window.scrollBy(0, event.deltaY);
}
event.preventDefault();
}, {passive: false});
</script>