jQuery循环:幻灯片播放一次后,重新启动一次并停止

编程入门 行业动态 更新时间:2024-10-28 16:28:32
本文介绍了jQuery循环:幻灯片播放一次后,重新启动一次并停止的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

因此,我正在运行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.

推荐答案

请参见 jquery .malsup/cycle/end.html 并尝试使用此方法或类似方法.

See jquery.malsup/cycle/end.html and try this or something similar.

$('#slideshow').cycle({ autostop: 1, end: function(options) { $('#slideshow').cycle(0).cycle('stop'); } });

更多推荐

jQuery循环:幻灯片播放一次后,重新启动一次并停止

本文发布于:2023-10-23 01:31:29,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1519338.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:幻灯片   重新启动   jQuery

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!