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
This should help:
/*
reinit() method reinitialize plugin
Syntax:
owldata.reinit(newOptions)
Yes! you can reinit plugin with new options. Old options
will be overwritten if exist or added if new.
You can easly add new content by ajax or change old options with reinit method.
*/
$('.reinit').click(function(e){
e.preventDefault()
if(booleanValue === true){
booleanValue = false;
} else if(booleanValue === false){
booleanValue = true;
}
owl.data('owlCarousel').reinit({
singleItem : booleanValue
});
})