问题
I am now using this code to change the speed on each slide, but I also need to change the slide animation for some slides. Any ideas how to do this in a similar or any other way?
$(window).load(function() {
$('.flexslider').flexslider({
animation: "slide",
controlNav: false,
directionNav: false,
pausePlay: true,
animationSpeed: 300,
start: function(slider) {
clearInterval(slider.animatedSlides);
slider.animatedSlides = setInterval(slider.animateSlides, YOUR_TIMEOUT_FOR_FIRST_SLIDE(ONLY FOR START));
},
after: function(slider){
if(slider.currentSlide == 0) {
clearInterval(slider.animatedSlides);
slider.animatedSlides = setInterval(slider.animateSlides, FIRST_TIMEOUT);
}
if(slider.currentSlide == 1) {
clearInterval(slider.animatedSlides);
slider.animatedSlides = setInterval(slider.animateSlides, SECOND_TIMEOUT);
}
if(slider.currentSlide == 2) {
clearInterval(slider.animatedSlides);
slider.animatedSlides = setInterval(slider.animateSlides, THIRD_TIMEOUT);
}
}
});
来源:https://stackoverflow.com/questions/18685300/flexslider-different-slideshow-animation-on-each-slide