3

I have two slides going. I was using OWL 1 and it worked great. I would like the infinite loop, so moved to OWL 2.

The following code works great. The slides stay in sync, but autoplay never starts. I have to drag the slides or show the navigation and click next/prev.

Hoping the answer is pretty obvious to someone with more experience.

$(document).ready(function() {

var carousel_1 = $('#the_carousel'),
carousel_2 = $('#the_carousel_content');

carousel_2.on('change.owl.carousel', function(event) {
carousel_1.trigger('to.owl.carousel', [event.item.index,100,true]);

});

carousel_1.owlCarousel({
items:1,
loop:true,
autoPlay: true,
autoplayTimeout: 100,
slideBy: 1,
autoplaySpeed: 100,
 rewindNav: false
});

carousel_2.owlCarousel({
items:1,
loop:true,
autoPlay: false,
autoplaySpeed: 100,
autoplayTimeout: 100,
nav:false,
slideBy: 1,
rewindNav: false
});

});
</script>

Thanks!

sde7676
  • 31
  • 1
  • 2

2 Answers2

4

Consider the typo at:

autoPlay: true,

it must be:

autoplay: true,

And for the ones who has downloaded the development version of library must be careful that the autoplay plugin is not included as user em2 said.

raso
  • 71
  • 2
0

this guy had the same problem: Owl Carousel Will Not Autoplay

you need to manually add autoplay.js library from owl site

<script src="owl/js/owl.autoplay.js"></script>
Community
  • 1
  • 1
em2
  • 93
  • 6