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

javascript - Owl Carousel - How to show all the images underneath the main carousel? - Stack Overflow

programmeradmin0浏览0评论

I want to show the list of all the available images underneath the carousel so that way when someone clicks on one of the images it bees the main photo in the carousel... Not quite sure how to do this. tried looking into it but cant find anything.

I want to show the list of all the available images underneath the carousel so that way when someone clicks on one of the images it bees the main photo in the carousel... Not quite sure how to do this. tried looking into it but cant find anything.

Share Improve this question asked Jul 3, 2016 at 16:49 ShaneRibzShaneRibz 1072 gold badges3 silver badges7 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 6

There's a good open source support available for this. You can try this one: https://github./gijsroge/OwlCarousel2-Thumbs

Add it with the default owl carousel plugin and enable from your code:

$(document).ready(function(){
  $('.owl-carousel').owlCarousel({
    thumbs: true,
    thumbsPrerendered: true
  });
});

Add thumbnails (link slider and thumbnails with data-slider-id attribute)

<div class="owl-carousel" data-slider-id="1">
    <div>Your Content</div>
    <div>Your Content</div>
    <div>Your Content</div>
    <div>Your Content</div>
</div>
<div class="owl-thumbs" data-slider-id="1">
    <button class="owl-thumb-item">slide 1</button>
    <button class="owl-thumb-item">slide 2</button>
    <button class="owl-thumb-item">slide 3</button>
    <button class="owl-thumb-item">slide 4</button>
</div>
发布评论

评论列表(0)

  1. 暂无评论