jQuery循环:幻灯片播放一次后,重新启动一次并停止 [英] jquery cycle: after slideshow cycles once, restart on one and stop
问题描述
因此,我正在运行jQuery循环,我需要有关如何设置参数的帮助,因此幻灯片循环浏览一次,然后从第一个位置开始,然后停止.我的文字会随着图像滚动.现在,我可以使图像循环返回,将一个功能放在"end"上,但是当我执行此操作时,其中的文本不会激活,这是我的参数设置:
So I have jQuery cycle running and I need help on how to set the parameters so the slideshow cycles through once and then starts back on the first position and just stops. I have text that scroll through with the images. Now I can get the image to cycle back putting a function on "end" but the text on one does not activate when I do this, here is my parameters settings:
$.fn.cycle.defaults = {
fx: 'fade', // one of: fade, shuffle, zoom, scrollLeft, etc
timeout: 4000, // milliseconds between slide transitions (0 to disable auto
speed: 4000, // speed of the transition (any valid fx speed value)
pagerEvent: 'hover', // event which drives the pager navigation
end: function() {$('#slideshow').cycle('next'); },
sync: 1, // true if in/out transitions should occur simultaneously
nowrap: 1 // true to prevent slideshow from wrapping
};
有人知道谁让该循环运行一次,然后跳回到一个循环,然后在再次激活链接的情况下停止吗?我尝试使用autostop和autoStopCount,但我不想指出确切的数字以使其停止.任何帮助将不胜感激.
Does anyone know who to get the cycle to run through just once and then jump back to one then just stop with the link activated again? I tried using the autostop and autoStopCount but I do not want to indicate an exact number to make it stop. Any help would be most appreciated.
推荐答案
请参见 http://jquery .malsup.com/cycle/end.html 并尝试使用此方法或类似方法.
See http://jquery.malsup.com/cycle/end.html and try this or something similar.
$('#slideshow').cycle({
autostop: 1,
end: function(options) {
$('#slideshow').cycle(0).cycle('stop');
}
});
这篇关于jQuery循环:幻灯片播放一次后,重新启动一次并停止的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!