Such a problem with setting owl-carousel v2. Initially, it was necessary to make an endless slider. They took owl, but for this purpose it uses cloning of elements, but we absolutely do not need it. We decided to do this: as soon as we reach the last slide, we change the direction by the property rtl: true. Only there was a problem how to set this property dynamically. Variants found on the Internet often give different errors and do not give the desired result. MB someone faced, or advise a slider to do it without cloning?
I tried to do this, but it gives an error (
hitsSldier.on('changed.owl.carousel', function (event) { var slidePrePage = event.page.size; var count = event.item.count; var currentSlide = event.item.index; if(currentSlide == count-slidePrePage){ var carousel = hitsSldier.data('owl.carousel'); carousel.settings.rtl = true; hitsSldier.trigger('refresh.owl.carousel'); } });