Swiper.js使用遇到的问题总结
作者:互联网
问题一:onSlideChangeEnd回调偶尔不触发
使用 fade 过渡方法,onSlideChangeEnd 回调偶尔触发,偶尔不触发。 因此使用 onTransitionEnd(过渡效果结束之后触发);
var mySwiper = new Swiper('.swiper-container',{
effect: 'fade',
onTransitionEnd: function (swiper) {
console.log("页面跳转到第:", swiper.activeIndex, " 页")
}
})
问题二:
标签:总结,触发,onTransitionEnd,onSlideChangeEnd,js,Swiper,fade,swiper 来源: https://www.cnblogs.com/ZerlinM/p/14185666.html