TA的每日心情 | 衰 2017-10-9 09:34 |
---|
签到天数: 1 天 [LV.1]初来乍到
新手上路
- 积分
- 8
|
5金钱
for (var i=0;i<album_size;i++) {
var pic_count = $("#album_pic_count_"+i).val();
var idstr = "#bs_photo"+i;
var swiper = new Swiper(idstr, {
direction : 'horizontal',
lazyLoading : true,
lazyLoadingInPrevNext : true,
lazyLoadingInPrevNextAmount : 1,
lazyLoadingOnTransitionStart : true,
pagination: '.swiper-pagination',
paginationType: 'fraction',
autoHeight: true,
paginationFractionRender:function (swiper, currentClassName, totalClassName) {
return "<span class=\"swiper-pagination-current\">"+currentClassName +"</span>/<span class=\"swiper-pagination-total\">"+pic_count+"</span>";
},
onSlideChangeStart: function(swiper){
// 在这里需要获取 idstr 我尝试过直接使用它 获取的是最后一次循环的结果 无法获取当前 swiper
}
})
}
|
|