I developed a custom jQuery plugin that replaces the default scrollbar with my own, managing mousewheel and bar dragging events.
The issue arises when I place content containing my custom scrollbar within another content also using my scrollbar. When I scroll using the mousewheel on the child content, it causes the parent content to scroll as well.
This occurs because I attached a mousewheel event listener to both the child and parent elements, resulting in triggering of both event handlers when the mouse moves over them simultaneously.
My dilemma is how to enable scrolling only on the child content without affecting the parent element.
If you have any advice on how to tackle this problem, I would greatly appreciate it. The dragging scrollbar functionality seems to be working fine.