Home › Forums › JavaScript › HELP! How do I slow down this jQuery Slide Show? › Re: HELP! How do I slow down this jQuery Slide Show?
June 23, 2010 at 10:00 am
#78570
Capt Otis
Member
Code:
$(function() {
$(‘#s1’).cycle({
delay: -2000,
fx: ‘shuffle’,
speed: ‘fast’,
timeoutFn: calculateTimeout
});
});
$(‘#s1’).cycle({
delay: -2000,
fx: ‘shuffle’,
speed: ‘fast’,
timeoutFn: calculateTimeout
});
});
// timeouts per slide (in seconds)
var timeouts = [2,4,2];//change these to number of seconds per slide
function calculateTimeout(currElement, nextElement, opts, isForward) {
var index = opts.currSlide;
return timeouts[index] * 1000;
}
Just taking a shot at the dark here… but you posted exactly what you need to change. Change var timeouts to the number of seconds you want per slide. I haven’t tested this but it should work.