I am trying to reinitialize Owl carousel after a successful ajax call. The ajax call will change the data but the view should stay the same.I am having an issue where the vi
The example below works.
Initializing the carousel:
owl = $("#owl-demo");
owl.owlCarousel({
items: 10,
autoPlay: 1000,
});
And when you use the ajax callback, try:
owl.data('owlCarousel').destroy();
owl.owlCarousel({
items: 5,
autoPlay: 1000,
});
I create a fiddle to explain you how to re-initialize the carousel: http://jsfiddle.net/s10bgckL/959/
PS: I did not create an array of options just if you want to modify some parameters as speed, quantity of displayed items, etc.
I hope it helps.