jQuery 循环插件 - 停止

发布于 2024-08-10 16:42:46 字数 373 浏览 7 评论 0原文

我的页面设置为当您将鼠标悬停在其类别链接上时启动图像自动滚动(使用循环插件)。效果很好。我现在想要的是当您将鼠标悬停在链接之外时自动循环停止,然后开始手动“下一个/上一个”幻灯片放映。

基本上,当您将鼠标悬停在类别链接上时,会循环浏览图像。当您将鼠标悬停时,停止幻灯片放映并使用下一个/上一个按钮手动查看图像。

但是,当用户将鼠标悬停在链接之外时,我无法让幻灯片停止。我需要以某种方式杀死该插件,然后使用新选项(手动滚动)重新初始化它。

我该怎么做呢? 我正在谈论的循环插件: http://malsup.com/jquery/cycle/

I have my page setup to start an automatic scroll of images (with the cycle plugin) when you hover over it's category link. That works fine. What I want now is to have the automatic cycling stop when you hover off the link and then to start the manual 'next/prev' slideshow.

Basically, when you hover over the category link, cycle through the images. When you hover off, stop the slideshow and use the next/prev buttons to manually view the images.

I can't, however, get the slideshow to stop when the user hovers off the link. I need someway to kill the plugin then reinitialize it with the new options (the manual scroll).

How can I go about doing this?
Cycle plugin I'm talking about: http://malsup.com/jquery/cycle/

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

终陌 2024-08-17 16:42:46

Cycle 插件有 暂停 & resume 方法 可能会实现您所追求的目标。

另外,如果您浏览其他演示列表,您将找到许多以编程方式与运行幻灯片交互的示例。

The Cycle plugin has pause & resume methods which may achieve what you're after.

Also, if you browse through the list of Additional Demos you'll find many examples of interacting with running slideshows programmatically.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文