有什么方法可以使jQuery循环在到达末尾或开始时不循环? [英] Any way to make jQuery cycle not loop when reaching the end or the beginning?

查看:62
本文介绍了有什么方法可以使jQuery循环在到达末尾或开始时不循环?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我意识到该插件被称为CYCLE,因为它可以循环列表中的元素.但是我最喜欢的是它的灵活性,所以我想知道是否有任何方法可以使插件不循环.因此,如果您尝试在第一张幻灯片上跳到上一张幻灯片,或者在最后一张幻灯片上跳到下一张幻灯片,它只会停止.

I realize that the plugin is called CYCLE because it cycles throgh the element of the list. But what I like most about it is its flexibility, so I was wondering if there is any way to make the plugin not cycle. So if you try to go to the previous slide when on the first one, or to the next slide when on the last one, it just stops.

我一直在阅读选项和代码,但是找不到解决方法

I've been reading through the options and the code but cant find the solution

推荐答案

http://jquery. malsup.com/cycle/options.html

签出nowrap属性. (请参见 http://jquery.malsup.com/cycle/nowrap2.html )将其播放到nowrap: 1,并且在播放每张幻灯片1时间后,您的节目将停止.显然,这是您需要的选项.

Check out the nowrap property. (See http://jquery.malsup.com/cycle/nowrap2.html) Set it to nowrap: 1 and your show will stop after each slide has been played 1 time. This is clearly the option you'd need.

这篇关于有什么方法可以使jQuery循环在到达末尾或开始时不循环?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆