swiper手滑导航圆点不同步
// 滚动图
var mySwiper = new Swiper('.swiper-container', {
// 如果需要分页器
pagination: {
el: '.swiper-pagination',
},
onSlideChangeEnd: function (swiper) { // pagination BUG
var activeIndex = swiper.activeIndex;
$('.swiper-pagination')
.find('span')
.eq(activeIndex)
.addClass('swiper-pagination-bullet-active')
.siblings()
.removeClass('swiper-pagination-bullet-active');
}
});
当前名称:swiper手滑导航圆点不同步
标题路径:http://ybzwz.com/article/gipcce.html