Swiper.js使用遇到的问题总结

时间:2020-12-30 10:44:55   收藏:0   阅读:0

问题一:onSlideChangeEnd回调偶尔不触发

使用 fade 过渡方法,onSlideChangeEnd 回调偶尔触发,偶尔不触发。 因此使用 onTransitionEnd(过渡效果结束之后触发);

var mySwiper = new Swiper(‘.swiper-container‘,{
  effect: ‘fade‘,
  onTransitionEnd: function (swiper) {
    console.log("页面跳转到第:", swiper.activeIndex, " 页")
  }
})

问题二:

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!