猫头鹰转盘自动播放不工作



我对此搜索了很多,每次都找到了几乎相同的答案。我已经提到猫头鹰旋转木马元';t自动播放和猫头鹰旋转木马不会自动播放http://owlcarousel.owlgraphic.com/demos/autoplay.html

我使用以下代码来设置自动播放时间,但它不起作用:

<script type="text/javascript">
        $(document).ready(function() {
          var owl = $("#productslider");
        owl.owlCarousel({
        items: 1,
        autoplay: true
    });
       });
    </script>

我正在使用以下格式的猫头鹰旋转木马:

<div id="productslider" class="owl-carousel owl-theme">
                <div class="item">
                    <div class="product">
                        <a class="add-fav tooltipHere" data-toggle="tooltip" data-original-title="Add to Wishlist" data-placement="left">
                            <i class="glyphicon glyphicon-heart"></i>
                        </a>
                        <div class="image">
                            <div class="quickview">
                                <a title="Quick View" class="btn btn-xs  btn-quickview" data-target="#product-details-modal" data-toggle="modal"> Quick View </a>
                            </div><a href="product-details.html"><img src="images/product/34.jpg" alt="img" class="img-responsive"></a>
                            <div class="promotion"> <span class="new-product"> NEW</span> <span class="discount">15% OFF</span> </div>
                        </div>
                        <div class="description">
                            <h4><a href="product-details.html">Product 1</a></h4>
                            <p>abcd</p>
                            <span class="size">XL / XXL / S </span> </div>
                        <div class="price"> <span>$25</span> </div>
                        <div class="action-control"> <a class="btn btn-primary"> <span class="add2cart"><i class="glyphicon glyphicon-shopping-cart"> </i> Add to cart </span> </a> </div>
                    </div>
</div>

有人能告诉我我缺了什么吗?

不确定这是否解决了您的问题,但您可以设置autoplay:500。

autoPlayTimeout似乎不是有效的属性-http://owlgraphic.com/owlcarousel/#customizing

此外,autoplayHoverPause应停止OnHover

.owlCarousel({     
  autoplay:true,
  autoplayTimeout:2000,
  ...
  ...

相关内容

  • 没有找到相关文章

最新更新