How can I stop an owl carousel from rewinding? I just want a seamless loop

How to make an owl carousel from rewinding? I just want a continuous loop. Do I need to write a complete callback for something that should already be included in the plugin? I tried to use a loop: true; unsuccessfully.

+7
source share
3 answers

Try this option as an example.

$("#owl-demo").owlCarousel({ autoPlay: 3000, //Set AutoPlay to 3 seconds items : 4, rewindNav:false //**This }); 
+13
source

I ran into the same error and found a quick solution for it. You can use rewindSpeed: 0 with rewindNav: true .

I tested these settings:

 $("#owl-slider-hero").owlCarousel({ autoPlay : 5000, lazyLoad:true, navigation : false, slideSpeed : 500, paginationSpeed : 400, singleItem : true, rewindNav : true, rewindSpeed: 0 }); 

So the script is still rewinding, but you are unlikely to be able to see it. Change is not smooth, as in a continuous cycle, but it is pretty close.

Hope this helps someone!

+4
source

Before that, set the loop to false. Then it will work.

 $(document).ready(function() { $('.owl-carousel').owlCarousel({ items:4, lazyLoad:true, nav:true, loop:false, navRewind:false, margin:10 }); }) 
+1
source

Source: https://habr.com/ru/post/976691/


All Articles