2013-03-11 70 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' /* <- */ 
});