[英]Zurb Foundation Orbit slider - make non-infinite?
The Orbit slider in Foundation 3 is infinite, meaning it cycles through its slides over and over. Foundation 3中的Orbit滑块是无限的,这意味着它会一遍又一遍地循环滑动。
Is there a way to get it to display all its slides only once, stopping on the last slide? 有没有办法让它只显示一次所有幻灯片,停在最后一张幻灯片上?
There is a method provided (which is actually present in the docs @cuberoot referenced), here's the initialization code: 提供了一个方法(实际上存在于引用的文档@cuberoot中),这里是初始化代码:
$(window).load(function(){
$("#featured").orbit({
singleCycle: true // cycles through orbit slides only once
});
});
我会用afterSlideChange注册一个函数来检查它是否是最后一张幻灯片,然后调用orbit.stopClock()
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.