package.docs.demos.mousewheel.html Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of owl.carousel Show documentation
Show all versions of owl.carousel Show documentation
Touch enabled jQuery plugin that lets you create beautiful responsive carousel slider.
The newest version!
Mousewheel Demo | Owl Carousel | 2.3.4
Mousewheel
1
2
3
4
5
6
7
8
9
10
11
12
Overview
To add mouswheel scrolling just include the fantastic plugin jquery.mousewheel.js created by Brandon Aaron.
Link to plugin GitHub page
Setup
var owl = $('.owl-carousel');
owl.owlCarousel({
loop:true,
nav:true,
margin:10,
responsive:{
0:{
items:1
},
600:{
items:3
},
960:{
items:5
},
1200:{
items:6
}
}
});
owl.on('mousewheel', '.owl-stage', function (e) {
if (e.deltaY>0) {
owl.trigger('next.owl');
} else {
owl.trigger('prev.owl');
}
e.preventDefault();
});
© 2015 - 2024 Weber Informatics LLC | Privacy Policy