A
A
Asil Abdusamatov2021-02-18 09:52:21
JavaScript
Asil Abdusamatov, 2021-02-18 09:52:21

How to cancel a slide when clicking the mouse to the right, to the left. To work only when scrolling?

How to cancel a slide when clicking the mouse to the right, to the left. To work only when scrolling?
It is necessary that it slides only when scrolling, without pressing the mouse to the sides.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Asil Abdusamatov, 2021-02-18
@Senpai228

jQuery("#sliderHome").owlCarousel({
autoplay: false,
lazyLoad: true,
loop: true,
margin: 0,
/*
animateOut: 'fadeOut',
animateIn: 'fadeIn',
*/
responsiveClass: true,
autoHeight: true ,
autoplayTimeout: 7000,
smartSpeed: 2000,
nav: false,
dots: false,
items: 1
});
var owl = $('#sliderHome');
owl.on('mousewheel', '.owl-stage', function (e) {
if (e.deltaY>0) {
owl.trigger('prev.owl');
} else {
owl.trigger('next. owl');
e.preventDefault();
});

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question