我从最新的基金会定制Orbit有问题。来自the docs:
轨道选项只能在此时初始化期间传递。
{
timer_speed: 10000,
animation_speed: 500,
bullets: true,
stack_on_small: true,
container_class: 'orbit-container',
stack_on_small_class: 'orbit-stack-on-small',
next_class: 'orbit-next',
prev_class: 'orbit-prev',
timer_container_class: 'orbit-timer',
timer_paused_class: 'paused',
timer_progress_class: 'orbit-progress',
slides_container_class: 'orbit-slides-container',
bullets_container_class: 'orbit-bullets',
bullets_active_class: 'active',
slide_number_class: 'orbit-slide-number',
caption_class: 'orbit-caption',
active_slide_class: 'active',
orbit_transition_class: 'orbit-transitioning'
}
嗯,太好了。但是如何申请呢?我试过了
$('#slider').orbit({...});
---
$(document).foundation().orbit({...});
但没有任何作用。我知道这很傻,但怎么办呢?
答案 0 :(得分:2)
“从4.0.7开始,您还可以使用data-options属性将配置设置传递给Orbit。” 来源:foundation.zurb.com/docs/components/orbit.html
将其视为样式属性:
<ul data-orbit data-options="timer_speed:2500; bullets:false;">
...
</ul>
答案 1 :(得分:1)
$(document).foundation('orbit', {bullets:false});