swiper实现滑动到某页锁住不让滑动
var swiper = new Swiper('.swiper-container', { pagination: '.swiper-pagination', onTouchStart: function(swiper,even){ swiper.unlockSwipeToPrev(); swiper.unlockSwipeToNext(); if(swiper.isEnd){ swiper.lockSwipeToNext(); }else if(swiper.activeIndex==0){ swiper.lockSwipeToPrev(); } } });
swiper文档(swiper3):lockSwipeToNext