How to reinitialize Owl Carousel after an ajax call?

后端 未结 7 1655
礼貌的吻别
礼貌的吻别 2020-12-20 12:12

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

7条回答
  •  余生分开走
    2020-12-20 12:29

    This one works for me in version 2

    var owl = $('#owl-carousel');
    owl.trigger('destroy.owl.carousel');
    owl.owlCarousel({
       items: 1,
    });
    

提交回复
热议问题