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

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

WBOY
Release: 2016-06-24 11:37:55
Original
1126 people have browsed it

<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>
Copy after login

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

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

2)  observer:true

3) observeParents:true

这代码都加上~

source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template