admin管理员组文章数量:1410689
So I am trying to get the dot data working in the Owl Carousel 2 as outlined in the docs. However no matter what I do the dot data I add never appears. I put together a fiddle example to show this.
$('.owl-carousel').owlCarousel({
items: 3,
nav: false, // Show next and prev buttons
smartSpeed: 450,
loop: false,
dotData: true
});
<div class="owl-carousel">
<div data-dot="1"><img src="/&text=1" alt=""></div>
<div data-dot="2"><img src="/&text=2" alt=""></div>
<div data-dot="3"><img src="/&text=3" alt=""></div>
<div data-dot="4"><img src="/&text=4" alt=""></div>
</div>
/
The JS file was just downloaded from the site. I found this beta build of the js online and it does work.
What am I missing here? Is this a known issue?
So I am trying to get the dot data working in the Owl Carousel 2 as outlined in the docs. However no matter what I do the dot data I add never appears. I put together a fiddle example to show this.
$('.owl-carousel').owlCarousel({
items: 3,
nav: false, // Show next and prev buttons
smartSpeed: 450,
loop: false,
dotData: true
});
<div class="owl-carousel">
<div data-dot="1"><img src="http://placehold.it/800x200/008CBA/FFFFFF/&text=1" alt=""></div>
<div data-dot="2"><img src="http://placehold.it/800x200/008CBA/FFFFFF/&text=2" alt=""></div>
<div data-dot="3"><img src="http://placehold.it/800x200/008CBA/FFFFFF/&text=3" alt=""></div>
<div data-dot="4"><img src="http://placehold.it/800x200/008CBA/FFFFFF/&text=4" alt=""></div>
</div>
http://jsfiddle/e8v31thz/1/
The JS file was just downloaded from the site. I found this beta build of the js online and it does work.
What am I missing here? Is this a known issue?
Share Improve this question asked Nov 13, 2015 at 22:01 David WardDavid Ward 5033 silver badges15 bronze badges2 Answers
Reset to default 4In latest version of owl carousel use dotsData: true
instead of dotdata: true
as said in docs
Did you try using the latest version from OwlCarousel ?
Also, you are not including the OwlCarousel CSS theme, it doesn't e in the package, you can use this one OWL Default Theme FIle.
Another option could be that you have too few slides but that's just a theory.
本文标签: javascriptdotData in owl carousel 2 not workingStack Overflow
版权声明:本文标题:javascript - dotData in owl carousel 2 not working - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745020452a2638100.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论