2013-03-11 39 views

回答

0

對於這一點,你必須改變這種plugin

core code在插件

var setSlidePosition = function(){ 
    // if last slide, not infinite loop, and number of children is larger than specified maxSlides 
    if(slider.children.length > slider.settings.maxSlides && slider.active.last && !slider.settings.infiniteLoop){ 
     if (slider.settings.mode == 'horizontal'){ 
      // get the last child's position 
      var lastChild = slider.children.last(); 
      var position = lastChild.position(); 
      // set the left position 
      setPositionProperty(-(position.left - (slider.viewport.width() - lastChild.width())), 'reset', 0); 
     }else if(slider.settings.mode == 'vertical'){ 
      // get the last showing index's position 
      var lastShowingIndex = slider.children.length - slider.settings.minSlides; 
      var position = slider.children.eq(lastShowingIndex).position(); 
      // set the top position 
      setPositionProperty(-position.top, 'reset', 0);//Change this line 
     } 
    // if not last slide 
    }else{ 
     // get the position of the first showing slide 
     var position = slider.children.eq(slider.active.index * getMoveBy()).position(); 
     // check for last slide 
     if (slider.active.index == getPagerQty() - 1) slider.active.last = true; 
     // set the repective position 
     if (position != undefined){ 
      if (slider.settings.mode == 'horizontal') setPositionProperty(-position.left, 'reset', 0); 
      else if (slider.settings.mode == 'vertical') setPositionProperty(-position.top, 'reset', 0); 
     } 
    } 
} 

更改行:

setPositionProperty(-position.top, 'reset', 0); 

setPositionProperty(position.top, 'reset', 0); 

然後嘗試

1

您可以設置使用定位滑塊箭頭的位置。例如,我們將滑塊「箭頭」的位置設置爲絕對,上箭頭,下箭頭。

0

您可以設置車展滑動的方向轉變(autoDirection: 'prev')

$('.bxslider').bxSlider({ 
    mode: 'vertical', 
    slideMargin:20, 
    minSlides: 4, 
    maxSlides: 4, 
    moveSlides: 1, 
    auto: true, 
    autoDirection: 'prev' /* <- */ 
});