如何在bxslider上设置幻灯片持续时间 [英] How to set up slide duration at bxslider
本文介绍了如何在bxslider上设置幻灯片持续时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我知道我可以设置过渡速度(使用speed
).但是,是否有任何选项可以设置幻灯片的显示持续时间,直到开始过渡到下一张幻灯片?
I know I can set the speed of the transition (with speed
). But is there any option to set the duration a slide is shown until the transition to the next slide begins?
推荐答案
使用pause
选项:
$('.bxslider').bxSlider({
pause: 3000
});
示例:
http://jsfiddle.net/Yq3RM/202/
更新
另一个修改每个图像暂停的示例.我知道bxSlider并没有很好的内置方法来执行此操作,但是我可以通过以下方式完成该操作:
Another example that modifies the pause for each image. bxSlider doesn't have a nice built in way to do this that I am aware of, however I was able to pull it off in the following way:
var ImagePauses = [1000,3000,6000,9000,12000,15000];
var slider = $('.bxslider').bxSlider();
modifyDelay(0);
function modifyDelay(startSlide){
slider.reloadSlider({
mode: 'horizontal',
infiniteLoop: true,
auto: true,
autoStart: true,
autoDirection: 'next',
autoHover: true,
pause: ImagePauses[startSlide],
autoControls: false,
pager: true,
pagerType: 'full',
controls: true,
captions: true,
speed: 500,
startSlide: startSlide,
onSlideAfter: function($el,oldIndex, newIndex){
modifyDelay(newIndex);
}
});
}
这篇关于如何在bxslider上设置幻灯片持续时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文