问题描述
我意识到该插件被称为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循环在到达末尾或开始时不循环?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!