消息关闭
    暂无新消息!

1.swiper配置

var swiperV = new Swiper('.swiper-container-v', {
    speed:1000,
    mousewheelControl : true,
    pagination: '.swiper-pagination-v',
    paginationClickable: true,
    direction: 'vertical',
    spaceBetween: 0,
    autoHeight: true,
    observer:true,
    observeParents:true,
    onInit: function(swiper){ //Swiper2.x的初始化是onFirstInit
        swiperAnimateCache(swiper); //隐藏动画元素 
        swiperAnimate(swiper); //初始化完成开始动画
      }, 
      onSlideChangeEnd: function(swiper){ 
        swiperAnimate(swiper); //每个slide切换结束时也运行当前slide动画
      }
    });
var swiperV2 = new Swiper('.swiper-container-2', {
    pagination: '.swiper-pagination-v',
    paginationClickable: true,
    direction: 'vertical',
    spaceBetween: 4000,
    autoHeight: true,
    observer:true,
    observeParents:true,
    onInit: function(swiper){ //Swiper2.x的初始化是onFirstInit
        swiperAnimateCache(swiper); //隐藏动画元素 
        swiperAnimate(swiper); //初始化完成开始动画
      }, 
      onSlideChangeEnd: function(swiper){ 
        swiperAnimate(swiper); //每个slide切换结束时也运行当前slide动画
      }
});
2.切换tab是自己写的,改变div的显示和隐藏

1个回答