清爽的猫头鹰旋转木马2 [英] Refreshing Owl Carousel 2
本文介绍了清爽的猫头鹰旋转木马2的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有3个div,当我点击它们时激活幻灯片切换。在每个div里面都有猫头鹰旋转木马滑块。
I have 3 divs that activate slide toggle when I click on them. And inside every div there is owl carousel slider.
如果我触发一个div滑块显示,但是当我点击其他div滑块时不会显示,除非我调整窗口大小。
If I trigger one div the slider shows, but when I click other div slider doesn't show unless I resize the window.
如何为每个div中的滑块触发幻灯片切换刷新?
How can I trigger refresh on slide toggle for the slider in every div?
我试过这个在幻灯片切换但它不起作用:
I tried with this on slide toggle but it doesn't work:
$('.owl-slider').trigger('refresh.owl.carousel');
推荐答案
您可以使用课程触发。您可以尝试使用变量:
You trigger with a class. You can try with a variable:
var $owl = $('.owl-carousel').owlCarousel({
items: 1,
loop:true
});
$owl.trigger('refresh.owl.carousel');
这篇关于清爽的猫头鹰旋转木马2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文