A
A
Alexander Ivanov2016-04-19 15:04:40
Owl Carousel
Alexander Ivanov, 2016-04-19 15:04:40

How to disable mouse wheel scrolling in owlCarousel 2?

API www.owlcarousel.owlgraphic.com/docs/api-options.html
Tried like this:

owl2.owlCarousel({
    center: true,
    items:1,
    smartSpeed:450,
    loop:true,
    touchDrag: false,
    pullDrag: false,
    navRewind: false,
    dots: false,
    mouseDrag: false,
    nav:true,
    navText: [ 'сюда', 'туда' ],
    margin:0,
    responsive:{
      0:{
        items:1
      },
      1200:{
        items:1
      }
    }
});

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Ivanov, 2016-04-19
@cimonlebedev

Forgot to turn it off

owl2.on('mousewheel', '.owl-stage', function (e) {
    if (e.deltaY>0) {
      owl2.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