我正在尝试让Foundation 5的交换(带有HTML部分(工作,但部分没有加载。Foundation5、jQuery 和 Interchange 位于
/bower_components/
索引.html位于
/src/
小型.html、中型.html和大型.html部分位于
/src/app/nav/
以下是相关文件:
索引.html在</body>
之前在底部包含JavaScript *
<!-- build:js(.) scripts/vendor.js -->
<!-- bower:js -->
<script src="bower_components/jquery/dist/jquery.js"></script>
<script src="bower_components/jquery.cookie/jquery.cookie.js"></script>
<script src="bower_components/jquery-placeholder/jquery.placeholder.js"></script>
<script src="bower_components/foundation/js/foundation.js"></script>
<script src="bower_components/foundation/js/foundation/foundation.interchange.js"></script>
<!-- endbower -->
<!-- endbuild -->
交换测试.html
<div data-interchange="[small.html, (small)], [medium.html, (medium)], [../large.html, (large)]">
<div data-alert class="alert-box secondary radius">
This is the default content.
</div>
</div>
app.scss
/* Define mobile styles */
@media only screen {
body {
background: red;
}
}
/* min-width 641px, medium screens */
@media only screen and (min-width: 40.063em) {
body {
background: orange;
}
}
/* min-width 1025px, large screens */
@media only screen and (min-width: 64.063em) {
body {
background: yellow;
}
}
关于这里有什么问题的任何想法?提前谢谢。
我通过在索引中添加 $(document).foundation('interchange', 'reflow');
来解决这个问题.html并且我还通过在文件名前添加 ../app/nav/
来更改部分路径,如下所示
<div data-interchange="[../app/nav/small.html, (small)], [../app/nav/medium.html, (medium)], [../app/nav/large.html, (large)]">
<div data-alert class="alert-box secondary radius">
This is the default content.
</div>
以下是关于基金会回流 http://foundation.zurb.com/forum/posts/1712-bind-foundation-5-clearing-to-dynamically-loaded-images