Issue
I have top mini navigation I want to scroll it horizontally. when someone scrolls vertically downward. so that they can view the overflowing text in the mini navigation.
Solution
You can use wheel event
on your element for example
const element = document.querySelector('#parent-element');
element.addEventListener('wheel', (e) => {
element.scrollLeft += e.deltaY);
})
Answered By - Mustafa Reda
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.