问题描述
我对 wordpress 和 Elementor 中的猫头鹰轮播有一些问题。首先,我在 .owl-carousel
中添加 document.ready
类,然后实例化 owl carousel 选项。我面临两个问题。第一个是页面加载猫头鹰轮播需要一些时间来加载(不到一秒),这使用户可以看到从简单网格到轮播的过渡。我想这与 dom 有关,而且它从一开始就没有准备好。
第二个是在 Elementor 中我根本看不到猫头鹰轮播效果(不太重要)。
(function($){
$(document).ready(function(){
$('.dc-homepage-carousel .elementor-widget-wrap').addClass('owl-carousel');
$('.dc-homepage-carousel .owl-carousel').owlCarousel({
loop:true,nav:true,margin:3,dots: false,autoplay: true,autoplayHoverPause: true,autoplaySpeed: 1000,animateOut: 'fadeOut',smartSpeed :900,navText : ["<i class='fa fa-chevron-left'></i>","<i class='fa fa-chevron-right'></i>"],responsive:{
0:{
items:1
},600:{
items:3
},1000:{
items:6
}
}
})
});
})(jQuery);
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)