swiper返回当前活动块在loop 模式下的索引为undefined
varmySwiper=newSwiper('.swiper-container',{nextButton:'.swiper-button-next',prevButto...
var mySwiper = new Swiper('.swiper-container', {
nextButton: '.swiper-button-next',
prevButton: '.swiper-button-prev',
loop : true,
spaceBetween: 30,
centeredSlides: true,
autoplay: 5000,
speed:500,
autoplayDisableOnInteraction: false,
onSlideChangeEnd:function(mySwiper){
alert(mySwiper.activeLoopIndex);
}
});
弹出的是undefined 展开
nextButton: '.swiper-button-next',
prevButton: '.swiper-button-prev',
loop : true,
spaceBetween: 30,
centeredSlides: true,
autoplay: 5000,
speed:500,
autoplayDisableOnInteraction: false,
onSlideChangeEnd:function(mySwiper){
alert(mySwiper.activeLoopIndex);
}
});
弹出的是undefined 展开
- 你的回答被采纳后将获得:
- 系统奖励15(财富值+成长值)+难题奖励30(财富值+成长值)
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询