想找下这边有木有在关注 foundation 的童鞋。
最近有个项目中用到了这个响应式的 css 框架,感觉代码干净,相当容易上手。但是捏,在使用过程中遇到一个小问题,就是它的导引功能一直报错,提示“$content_el”未定义之类的错误,追查到 js/foundation/foundation.joyride.js 中的 start 方法中调用如下:
<code>
// non configureable settings
this.settings.$content_el = $this;
this.settings.$body = $(this.settings.tip_container);
this.settings.body_offset = $(this.settings.tip_container).position();
this.settings.$tip_content = this.settings.$content_el.find('> li');
this.settings.paused = false;
this.settings.attempts = 0;
</code>
接着的 $tip_content 也会同样提示丢失。我猜测是它对应的 <ol class="joyride-list" data-joyride> 声明中缺失了相应说明。
foundation 官方文档参见:
http://foundation.zurb.com/docs/components/joyride.html
这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。
https://www.v2ex.com/t/93500
V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。
V2EX is a community of developers, designers and creative people.