Closed edmondko closed 7 years ago
I'm trying to stop autoplay on Drag event, but it doesnt seem to work. I've tried to trigger the event but it doesn't work at all. I got to do this but it's not best solution:
carouselOptions = { items: 1, dotsContainer: '.owl-dots', navigation: false, loop: true, lazyLoad: false, autoplay: true, autoplayTimeout: 5000, onDrag: this.onDrag }; onDrag(event) { event.relatedTarget.settings.autoplay = false; }
This code seems to work, on event but it plays another slide and then stops the autoplay.
have you tried using this.onDrag.bind(this) ?
this.onDrag.bind(this)
I actually did that and it worked, thanks for confirmation I'll close this ticket
I'm trying to stop autoplay on Drag event, but it doesnt seem to work. I've tried to trigger the event but it doesn't work at all. I got to do this but it's not best solution:
This code seems to work, on event but it plays another slide and then stops the autoplay.