查看: 17184|回复: 10
打印 上一主题 下一主题

关于Swiper基础演示中,缩略图控制的一些问题!

[复制链接]

该用户从未签到

0

主题

3

帖子

37

积分

新手上路

Rank: 1

积分
37
楼主
发表于 2016-11-21 14:14:57 | 显示全部楼层
刚刚解决了,直接用分页器写,不要用双向控制器了
  1.     var galleryTop = new Swiper('.gallery-top', {
  2.         nextButton: '.swiper-button-next',
  3.         prevButton: '.swiper-button-prev',
  4.         spaceBetween: 10,
  5.         pagination: '.swiper-pagination',
  6.         paginationClickable: true,
  7.         paginationBulletRender: function (swiper, index, className) {
  8.             return '<span style="background:url('+imageinfo[index].file_name+')" class="' + className + '"></span>';
  9.         },
  10.         onSlideChangeEnd: function(swiper){
  11.             var index = swiper.activeIndex;
  12.             $(".width_height").html(imageinfo[index].width_height);
  13.             $(".resolution").html(imageinfo[index].resolution);
  14.             $(".size").html(imageinfo[index].size);
  15.             $(".color").html(imageinfo[index].color);
  16.             $(".create_time").html(imageinfo[index].create_time);
  17.             $(".format").html(imageinfo[index].format);
  18.         }
  19.     });
复制代码
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|Swiper中文网 ( 粤ICP备15001020号

GMT+8, 2024-5-4 10:58 , Processed in 0.063814 second(s), 26 queries .

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表