|
刚刚解决了,直接用分页器写,不要用双向控制器了- var galleryTop = new Swiper('.gallery-top', {
- nextButton: '.swiper-button-next',
- prevButton: '.swiper-button-prev',
- spaceBetween: 10,
- pagination: '.swiper-pagination',
- paginationClickable: true,
- paginationBulletRender: function (swiper, index, className) {
- return '<span style="background:url('+imageinfo[index].file_name+')" class="' + className + '"></span>';
- },
- onSlideChangeEnd: function(swiper){
- var index = swiper.activeIndex;
- $(".width_height").html(imageinfo[index].width_height);
- $(".resolution").html(imageinfo[index].resolution);
- $(".size").html(imageinfo[index].size);
- $(".color").html(imageinfo[index].color);
- $(".create_time").html(imageinfo[index].create_time);
- $(".format").html(imageinfo[index].format);
- }
- });
复制代码 |
|