我正在尝试使用我在this question中找到的脚本在Foundation3中运行Orbit,但是我无法使它正确初始化。我在页脚中添加了此脚本,并在页眉中添加了Foundation.min.js。在控制台的第三行,我得到了一个没有方法'foundation‘的错误,它不能工作。
发布于 2013-04-13 13:16:00
您链接到的SO线程中的脚本将不会在您的上运行,因为它使用的是基础4。在基础3 (F3)中,Orbit的初始化方式有所不同。假设你有一个id为orbitX的元素。你可以这样初始化它:
$("#orbitX").orbit();在你问的另一个问题中
您将在何处添加其他设置?
在初始化orbit元素时执行此操作,如下所示:
$("#orbitX").orbit({
bullets: false; // to hide the bullets
});下面是完整的选项集
$('#orbitX').orbit({
animation: 'fade', // fade, horizontal-slide, vertical-slide, horizontal-push
animationSpeed: 800, // how fast animtions are
timer: true, // true or false to have the timer
resetTimerOnClick: false, // true resets the timer instead of pausing slideshow progress
advanceSpeed: 4000, // if timer is enabled, time between transitions
pauseOnHover: false, // if you hover pauses the slider
startClockOnMouseOut: false, // if clock should start on MouseOut
startClockOnMouseOutAfter: 1000, // how long after MouseOut should the timer start again
directionalNav: true, // manual advancing directional navs
captions: true, // do you want captions?
captionAnimation: 'fade', // fade, slideOpen, none
captionAnimationSpeed: 800, // if so how quickly should they animate in
bullets: false, // true or false to activate the bullet navigation
bulletThumbs: false, // thumbnails for the bullets
bulletThumbLocation: '', // location from this file where thumbs will be
afterSlideChange: function(){}, // empty function
fluid: true // or set a aspect ratio for content slides (ex: '4x3')
});https://stackoverflow.com/questions/15980783
复制相似问题