|
啊啊啊,菜鸟求救啊~~~
嵌套的swiper内的动画要怎么控制啊,实例化两个swiper。但是页面内用animate插件的动画好想不能分别控制啊,求救啊!!
一下是代码,求大神帮助啊!!!
$(function(){
var swiperV = new Swiper('#swiper-container-v', {
pagination: '.swiper-pagination-v',
direction: 'vertical',
scrollbarHide: false,
scrollbar: '.swiper-scrollbar',
onInit: function(swiper){ //Swiper2.x的初始化是onFirstInit
swiperAnimateCache(swiper); //隐藏动画元素
swiperAnimate(swiper); //初始化完成开始动画
},
onSlideChangeEnd: function(swiper){
swiperAnimate(swiper); //每个slide切换结束时也运行当前slide动画
}
});
var swiperH = new Swiper('#swiper-container-h', {
pagination: '.swiper-pagination-h',
direction: 'vertical',
onInit: function(swiper){ //Swiper2.x的初始化是onFirstInit
swiperAnimateCache(swiper); //隐藏动画元素
swiperAnimate(swiper); //初始化完成开始动画
},
onSlideChangeEnd: function(swiper){
swiperAnimate(swiper); //每个slide切换结束时也运行当前slide动画
}
});
});
|
|