0

scroll horizontally inside an element

Hello everyone. I was wondering how I can disable page scrolling when mouse enters an element. I want to scroll horizontally inside the element using mouse wheel, but the problem is the entire page also scrolls with it. how can I fix this?

14th Feb 2022, 12:47 PM
FarshidGlz
FarshidGlz - avatar
6 Respostas
0
your code is good👍 I didn't know that trick and most of users who are going to visit the website may not know it, too. for example, on Youtube website, you can see there is a scrolling part at the top of videos containing some tags that by clicking them you can filter the type of videos you want to see and it can scroll using mouse wheel without scrolling entire page at the same time. I like to do the same thing.
14th Feb 2022, 4:54 PM
FarshidGlz
FarshidGlz - avatar
0
Thank you very very much my friend😃👐🌹. Did you add the JavaScript code when posting your answer for the first time, or you just modified it now? Because I didn't see it at first.
14th Feb 2022, 7:22 PM
FarshidGlz
FarshidGlz - avatar
0
hmm ok, thanks ✌️
14th Feb 2022, 7:28 PM
FarshidGlz
FarshidGlz - avatar