119
rated 0 times
[
126]
[
7]
/ answers: 1 / hits: 27316
/ 9 Years ago, wed, december 9, 2015, 12:00:00
I'm attempting a horizontal scroll with the mouse wheel, but doesn't seem to work.
Here is my Fiddle
My main class .selector
is the one with scrollable overflow
This is JS I am trying to initialise the scroll with
$('.selector').mousewheel(function(e, delta) {
this.scrollLeft -= (delta * 40);
e.preventDefault();
});
This is the example I am using for horizontal scroll https://css-tricks.com/snippets/jquery/horz-scroll-with-mouse-wheel/
Thanks in advance for any help!
EDIT: Thanks all, I forgot jQuery in the Fiddle yeah sorry, but when I was testing on localhost I was using jQuery 1.11.1 so maybe that was the case. Cheers guys
More From » jquery