首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何初始化Foundation 3以使用Orbit?

如何初始化Foundation 3以使用Orbit?
EN

Stack Overflow用户
提问于 2013-04-13 05:03:08
回答 1查看 574关注 0票数 3

我正在尝试使用我在this question中找到的脚本在Foundation3中运行Orbit,但是我无法使它正确初始化。我在页脚中添加了此脚本,并在页眉中添加了Foundation.min.js。在控制台的第三行,我得到了一个没有方法'foundation‘的错误,它不能工作。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2013-04-13 13:16:00

您链接到的SO线程中的脚本将不会在您的上运行,因为它使用的是基础4。在基础3 (F3)中,Orbit的初始化方式有所不同。假设你有一个id为orbitX的元素。你可以这样初始化它:

代码语言:javascript
复制
$("#orbitX").orbit();

在你问的另一个问题中

您将在何处添加其他设置?

在初始化orbit元素时执行此操作,如下所示:

代码语言:javascript
复制
$("#orbitX").orbit({
    bullets: false; // to hide the bullets
});

下面是完整的选项集

代码语言:javascript
复制
$('#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')
});
票数 5
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/15980783

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档