最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - dotData in owl carousel 2 not working - Stack Overflow

programmeradmin2浏览0评论

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 badges
Add a ment  | 

2 Answers 2

Reset to default 4

In 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.

发布评论

评论列表(0)

  1. 暂无评论