js代码
<script src="swiper/swiper.min.js"></script> <script> var mySwiper = new Swiper('.swiper-container', { pagination: '.swiper-pagination', nextButton: '.swiper-button-next', prevButton: '.swiper-button-prev', slidesPerView: 1, paginationClickable: true, spaceBetween: 30, loop: true, onReachEnd: function(swiper){ $("#t2").hide(); $("#t3").show(); } }); $("#t2,#t3").hide(); $("a.jion").on("click",function(){ $("#t1").hide(); $("#t2").show(); }); $(".swiper-container label,.swiper-container input").click(function(){ var this_active = $(this).parents(".swiper-slide").index(); setTimeout(function(){ mySwiper.slideTo(this_active+1,1000) },500); }); $('.swiper-button-next').click(function(){ if(mySwiper .isEnd){ $("#t2").hide(); $("#t3").show(); } }) </script>