在使用swiper时,解决同一个页面使用多个轮播出现问题做法

$(".swiper-container").each(function(){
    $(this).swiper({
	        loop: true,
	        initialSlide :0,
	        pagination:$('.swiper-pagination',this),
	        nextButton: $('.arrow-right',this),
	        prevButton:$('.arrow-left',this),
	        pagination: $('.swiper-pagination',this),	    
		    // 如果需要前进后退按钮
		nextButton: $('.swiper-button-next',this),
		prevButton: $('.swiper-button-prev',this),
     });
});

  

posted @ 2017-05-22 14:41  JSKevin  阅读(7163)  评论(2编辑  收藏  举报