[英]AutoPlay a slider with jQuery
I have the code following where I am unable to add Autoplay on the slider. 我有以下无法在滑块上添加自动播放的代码。 Can anyone help me with this? 谁能帮我这个?
$('#front-slides').slides({
preload: true,
generateNextPrev: false,
slideSpeed: 500,
animationStart: function(current){
$slideCaption = $(".slides_container div.slide:eq("+ (current-1) +") .caption").text();
$("#headline h6").text($slideCaption);
if($slideCaption != ''){
$("#headline").stop().hide().slideDown(600);
}else{
$("#headline").hide();
}
}
});
Just add following lines under the slideSpeed: 500, 只需在slideSpeed下添加以下几行:500,
play: 5000,
pause: 2500,
$(function() {
$(".slider").jCarouselLite({
auto:500,
speed:800,
btnNext: ".next",
btnPrev: ".prev",
visible: 5
});
});
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.