在使用 Foundation 6 构建整个网站之前和之后,我从未使用过,我意识到我的顶部栏下拉菜单中的链接不起作用。我到处寻找这个问题的答案,我看到了很多不同的答案。有人说要下载更新版本的foundation.min.js,有人说要下载更新版本的foundation.topbar.js,还有人认为这个问题解决不了。
下面是一些代码(我的网站可以在http://littleeternities.com找到,这样您就可以自己了解我所说的链接不“工作”的意思)。
顶部条码
<!--Navigation-->
<div class="title-bar" data-responsive-toggle="main-menu" data-hide- for="medium">
<button class="menu-icon" type="button" data-toggle></button>
<div class="title-bar-title">Menu</div>
</div>
<div class="top-bar" id="main-menu">
<div class="top-bar-left">
<ul class="dropdown menu" data-dropdown-menu>
<li><a href="#">Home</a></li>
</ul>
</div>
<div class="top-bar-right">
<ul class="menu vertical medium-horizontal" data-responsive-menu="drilldown medium-dropdown">
<li class="has-submenu">
<a href="#">About</a>
<ul class="submenu menu vertical" data-submenu>
<li><a href="#">Blog</a></li>
<li><a href="#">Portfolio</a></li>
</ul>
</li>
<li class="has-submenu">
<a href="#">Services</a>
<ul class="submenu menu vertical" data-submenu>
<li><a href="#">Pricing</a></li>
<li><a href="#">Custom Blog Design</a></li>
<li><a href="#">Custom Web Design</a></li>
<li><a href="#">Pre-Made Templates</a></li>
<li><a href="#">Branding Packages</a></li>
<li><a href="#">Web-Hosting</a></li>
</ul>
</li>
<li class="has-submenu">
<a href="#">Courses</a>
<ul class="submenu menu vertical" data-submenu>
<li><a href="#">Perfect Your Business Plan</a></li>
<li><a href="#">Kickstart Your Badass Online Business</a></li>
<li><a href="#">Digital Innovator</a></li>
<li><a href="#">More Courses</a></li>
</ul>
</li>
<li class="has-submenu">
<a href="#">Free</a>
<ul class="submenu menu vertical" data-submenu>
<li><a href="#">Kickstart Your Badass Business Checklist</a></li>
<li><a href="#">FREE Course: Build a Better Business in 7 Days</a></li>
<li><a href="#">Business Brainstorming Workbook</a></li>
<li><a href="#/">8 Business Tools to Use</a></li>
</ul>
</li>
<li><a href="#">Contact</a></li>
</ul>
</div>
</div>
<!-- /navigation -->
这是添加的脚本
<script src="../bower_components/jquery/dist/jquery.js"></script>
<script src="../bower_components/what-input/what-input.js"></script>
<script src="../bower_components/foundation-sites/dist/foundation.js"></script>
<script src="../js/app.js"></script>
<script src="../bower_components/foundation-sites/dist/foundation.min.js"></script>
<script src="../js/foundation.topbar.js"></script>
<script src="../bower_components/foundation-sites/js/foundation.offcanvas.js"></script>
在文件 app.js 中,编写了以下 JavaScript
$(document).foundation();
$(document).ready(function() {
});
到目前为止,我已经尝试了所有方法来解决这个问题,现在我只是卡住了。任何答案将不胜感激!:)