我对 Foundation 4 和 Orbit 插件有点陌生,但我不知道为什么 orbit 插件不会初始化。我已经安装了foundation 4的指南针版本。
zepto.js 和 jquery.js 位于 javascripts/vendor/,foundation.orbit.js 文件位于 javascripts/foundation/
现代化
<script src="javascripts/vendor/custom.modernizr.js"></script>
轨道插件:
<!-- Orbit Slides and Object -->
<div class="slideshow-wrapper">
<span class="preloader"></span>
<ul data-orbit>
<li>
<img src="placehold.it/1000x400" />
<div class="orbit-caption">...</div>
</li>
<li>
<img src="placehold.it//1000x400" />
<div class="orbit-caption">...</div>
</li>
<li>
<img src="placehold.it/1000x400" />
<div class="orbit-caption">...</div>
</li>
</ul>
</div>
该页面可以在这里找到:http: //foundationtest.tx0rx0.com/tx0rx0/testpage.html
我脑子里已经有了modernizr,这是该部分在最后一个body标签之前的样子:
<!-- Javascript for Orbit Image Slider -->
<script>
document.write('<script src=/javascripts/vendor/'
+ ('__proto__ ' in {} ? 'zepto' : 'jquery')
+ '.js><\/script>')
</script>
<script src= "/javascripts/foundation/foundation.js"></script>
<script src= "/javascripts/foundation/foundation.alerts.js"></script>
<script src= "/javascripts/foundation/foundation.orbit.js"></script>
<!-- Initialize Foundation -->
<script>
$(document).foundation();
</script>
我敢肯定这很简单,但我看不到它,如果有帮助,我们将不胜感激。谢谢你。