cycle2

jQuery Cycle2 per-slide speed option

旧城冷巷雨未停 提交于 2019-12-13 19:25:03
问题 I can change timeout using the timeoutFn. How can I do the same for speed ? I seached and could not find any way other that having the data-speed attribute on the slide elements. Is there any way to change that programmatically? $('.slideshow').cycle({ speed: 100, timeoutFn: calculateTimeout, slides: "li", fx: 'scrollLeft,scrollDown,scrollRight' }); function calculateTimeout(currElement, nextElement, opts, isForward) { var currentElementTransition = $(currElement).attr('data-timeout'); return