Answer the question
In order to leave comments, you need to log in
How to enable/disable drag in OwlCarousel 2?
In general, when an event occurs, for example, a click on a button or something like that, I want the slide not to move anywhere when I try to swipe.
var owl = $('.owl-carousel');
owl.on('drag.owl.carousel', function() {
owl.trigger('change.owl.carousel', {
mouseDrag: false,
touchDrag: false,
pullDrag: false
});
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question