Reputation: 443
I'm using owlcarousel on my website, but I have a few problems. For one, the responsiveness isn't working properly. And for two, the carousel won't autoplay. You can see the issue here.
Here's my code:
$(".owl-carousel").owlCarousel({
items: 1,
loop: true,
center: true,
dots: true,
autoplay: true,
autoplayTimeout: 5000,
autoplaySpeed: 5000,
responsiveClass: true,
responsive:{
0:{
items: 1
},
600:{
items: 1
},
1200:{
items: 1
}
}
});
Update: I managed to fix the responsive issues by adding:
itemsDesktop: [1200, 1],
itemsTablet: [980, 1],
itemsMobile: [700, 1]
to the options.
Still, the autoplay isn't working.
Upvotes: 0
Views: 3729
Reputation: 21
here is my solution :
$('.owl-carousel').owlCarousel({
item:3,
singleItem: true,
autoplay: true,
autoplayTimeout: 5000,
loop: true,
nav: true,
responsiveClass: true,
responsive:{
0:{
items: 1,
dots: false
},
600:{
items: 2,
dots: false
},
1200:{
items: 3
}
}
});
Upvotes: 1