我尝试使用此基础插件:http://foundation.zurb.com/docs/components/equalizer.html
这是我的代码:
<div class="row" data-equalizer>
<div class="large-4 medium-6 small-12 columns" data-equalizer-watch>
{some content}
</div>
<div class="large-4 medium-6 small-12 columns" data-equalizer-watch>
{some content}
</div>
<div class="large-4 medium-6 small-12 columns" data-equalizer-watch>
{some content}
</div>
</div>
然后我在我的身体结束之前添加了以下脚本:
<script src="js/foundation.min.js"></script>
<script src="js/foundation/foundation.reveal.js"></script>
<script src="js/foundation/foundation.datepicker.js"></script>
<script src="js/foundation/foundation.dropdown.js"></script>
<script src="js/foundation/foundation.equalizer.js"></script>
<script>
$(document).foundation();
</script>
</body>
问题在于均衡器无法正常工作。
正确加载所有.js(没有404错误),并且Javascript控制台不会抛出任何类型的错误。 对我来说似乎一切都很好,我错在哪里? 谢谢你们。
答案 0 :(得分:1)
单独加载每个插件,或者包含foundation.min.js,它会自动加载Foundation Core和所有JavaScript插件。
<script src="/js/foundation.min.js"></script>
<!-- or individually -->
<script src="/js/foundation.js"></script>
<script src="/js/foundation.alert.js"></script>
<!-- ... -->
<script src="/js/foundation.dropdown.js"></script>
<script src="/js/foundation.tab.js"></script>