Answer the question
In order to leave comments, you need to log in
How to get the current position of an OWL slider?
<div>slider</div>
<div>текущая позиция</div>
$('.area-range').owlCarousel({
startPosition: startPos,
loop: false,
margin: 30,
nav: false,
dots: false,
responsiveClass:true,
responsive:{
0:{
items:1
},
750:{
items:2
}
}
})
// drag.owl.carousel
Answer the question
In order to leave comments, you need to log in
I have already written many times, but I will repeat for you:
Remember the golden rule of the developer:
In any incomprehensible situation, see the documentation.
If the documentation did not clarify the situation, see the source codes and objects in the console.
In this case, the documentation https://owlcarousel2.github.io/OwlCarousel2/docs/a... tells us that there are essentially no public methods in the carousel for getting data. There are a bunch of events from which we can learn something, or, by generating them ourselves, influence the behavior.
And then it all depends on your specific case. It may be enough for you to listen to the event changed.owl.carousel
to know which slide the carousel has twisted on.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question