2013-07-19 87 views
0

我有一個滑塊,應該有一個無限循環的4個幻燈片,所以當你到達最後一個幻燈片時它會繼續滑動1,此刻它一直滑回第一個,我想animationLoop:true會做到這一點,但它不會:aniamtionLoop在Flexslider中不工作

var children_slides = $('.flexslider_children').flexslider({ 
    slideshow: false, // Remove the animations 
    controlNav : false, // Remove the controls 
    animation: "fade", 
    directionNav: true,    //Boolean: Create navigation for previous/next navigation? (true/false) 
    animationSpeed: 1000 

}); 

$('.flexslider').flexslider({ 
    slideshow: false, // Remove the animations 
    pauseOnHover : true, 
    animation: "slide", 
    itemWidth: 244, 
    animationLoop:true, 
    animationSpeed: 1000, 
    slideshowSpeed: 5000, 
    initDelay: 3000, 
    manualControls: ".flex-control-nav li a", 
    // Call the update_children_slides which itterates through all children slides 
    'before' : function(slider){ // Hijack the flexslider 
    update_children_slides(slider.animatingTo); 
    } 
}); 

任何想法可能是錯的什麼? 謝謝!

回答

1

如果刪除字符串

itemWidth:244,

animationLoop將工作

+0

這真是離奇!它爲什麼這樣工作?我試圖用minItems值爲2來設置一個值,我希望它在向左滾動時保持向左滾動,並且只是將項目一回來,但是它會這樣做hearkyjerky回滾以將項目1拉回到開始位置。 。 – jerrygarciuh