猫头鹰旋转木马2不能使用循环和1项(Bug现在修复) [英] owl carousel 2 not work with loop and 1 items (Bug Fixed Now)
问题描述
我使用猫头鹰传送带2传送带内容。
JS:
$('#owl-demo') .owlCarousel({
loop:true,
margin:10,
nav:true,
items:1,
});
HTML:
< div id =owl-democlass =owl-carousel>
< div class =item>< h4> 1< / h4>< / div>
< / div>
问题:
内容(使用PHP的动态内容) loop:true
和项目:1
不工作,我看到空白但如果我添加两个内容猫头鹰工作正常!!
编辑:我的内容是动态的(1 - ....)。当我的结果是一个内容猫头鹰有问题。
问题 DEMO
曾效力于 DEMO
如何解决这个问题?
我向Owl开发人员组报告此错误,并在此处修复此问题。
在提交中更改此行
view = Math.max(settings.items * 2,2),
现在这个工作在演示
I work with owl carousel 2 for carousel content.
JS:
$('#owl-demo').owlCarousel({
loop: true,
margin: 10,
nav: true,
items: 1,
});
HTML:
<div id="owl-demo" class="owl-carousel">
<div class="item"><h4>1</h4></div>
</div>
Problem:
when I have one content (dynamic content using PHP) loop:true
and items:1
not work and I see blank But if I add two content Owl worked true!!
EDIT : my content is dynamic ( 1 - ....). when my result is one content owl have a problem.
Problem DEMO
worked DEMO
how do fix this problem ?
I report this bug to Owl developer group and fix this problem here.
Change this line in Commit
view = Math.max(settings.items * 2, 2),
Now this worked in demo
这篇关于猫头鹰旋转木马2不能使用循环和1项(Bug现在修复)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!