This Js fiddle depicts the problem I'm in.
I'm using Nice Scroll plugin in my site. It works fine.
But in one page, I have to show the timeline with width almost 1000px. The client want to scroll down smoothly till the timeline.
When mouse pointer is in the timeline div, the scroll should move horizontally.
I've added this code to the site.
document.getElementById('tl-scroll').addEventListener('mousewheel', function(e) {
this.scrollLeft -= (e.wheelDelta);
e.preventDefault();
}, false);
It seems like the preventDefault
not working with nicescroll
.
please help me to clear this error.