swiper获取当前的index ( loop=true时,)
//swiper 在loop=true时,获取当前的index onSlideChangeEnd: function (swiper) { var index = $('.swiper-slide-active').attr('data-swiper-slide-index'); //console.log(index); var title = $(".Jcase .swiper-container .slide-" + index).data("title"); console.log(title) $('.Jcase .JlunboTxt').text(title); }