- ...
- timeoutFn: calculateDuration
- ...
- var durations = [1,2,3,4,5];
- function calculateDuration(currElement, nextElement, opts, isForward) {
- var index = opts.currSlide;
- return durations[index] * 1000;
- }
This doesn't work for speed though, there's no speedFn option like there is for timeout, and if use this same function for the speed it's only called once and just returns the first value.
I just need it exactly like the timeouts above, give it a list of seconds, and have a function to choose the right one.