Home  >  Article  >  Web Front-end  >  swiper有时候不能自动滚动的问题_html/css_WEB-ITnose

swiper有时候不能自动滚动的问题_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 11:37:551095browse

<script type="text/javascript">    $(function(){        var swiper = new Swiper('.swiper-container', {            pagination: '.swiper-pagination',            paginationClickable: true,            speed: 500,            loop: true,            observer:true,            observeParents:true,            autoplayDisableOnInteraction : false,            autoplay:500        });    })</script>

 最近遇到了这个问题,然后写了如上代码,就可以自动滚动了,记录一下以免忘记~

1)  $(function(){ .... })

2)  observer:true

3) observeParents:true

这代码都加上~

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn