Answer the question
In order to leave comments, you need to log in
Owl reinitialization. How to make owl carousel friends with ajax?
Can't re-call owl carousel after ajax content is loaded.
Tried like this but doesn't work:
$(".news__item__gallery").data('owlCarousel').destroy();
$('.popup-with-form').magnificPopup({
type: 'ajax',
mainClass: "mfp-fade",
closeBtnInside: true,
gallery: {
enabled: true,
},
callbacks: {
ajaxContentAdded: function() {
$(".news__item__gallery").data('owlCarousel').destroy();
}
}
});
$('.news__item__gallery').owlCarousel({
loop: true,
margin: 50,
dots: false,
nav: true,
responsive: {
0: {
items: 1
},
720: {
items: 3
},
1000: {
items: 4
}
}
})
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question