2016-11-24 78 views
0

我已经下载了基础6,压缩文件夹自带foundation.js,foundation.min.js的jquery.js,foundations.css,foundation.min.css。我尝试实施的下拉按钮,但是,他们没有工作,我不知道为什么。Zurb基金会6:下拉菜单按钮和链接不工作

<html> 
    <head> 
     <meta charset="utf-8" /> 
     <meta name="viewport" content="width=device-width, initial-scale=1.0"/> 
     <title>Home</title> 
     <link rel="stylesheet" href="../css/foundation.css"/> 
     <script src="../js/vendor/jquery.js"></script> 
     <script src="../js/vendor/foundation.js"></script> 
    </head> 

    <body> 
     <script>$(document).foundation();</script> 
     <button href="#" data-dropdown="drop1" aria-controls="drop1" aria-expanded="false" class="button dropdown">Dropdown Button</button><br> 
     <ul id="drop1" data-dropdown-content class="f-dropdown" aria-hidden="true"> 
      <li><a href="#">This is a link</a></li> 
      <li><a href="#">This is another</a></li> 
      <li><a href="#">Yet another</a></li> 
     </ul> 
    </body> 
</html> 

我真的不知道为什么这不起作用。请帮帮我!

(注:上面的下拉菜单的代码是从公报文档站点http://foundation.zurb.com/sites/docs/v/5.5.3/components/dropdown_buttons.html提取物)

回答

0

您正在使用相关的基础5.5.3代码,但在基础6核心文件。检查此链接以供参考:http://foundation.zurb.com/sites/docs/button.html

如果在控制台中加载了foundation.min.js并且没有错误,那么还要检查您的开发人员工具。

+0

是啊,我看到了。我的问题解决了。我在zurb基金会论坛上寻求帮助。我的目标是要建立一个多页的网站zurb,但是,我已经学会了独自做到这一点,只是在我的代码测试一些东西。无论如何,感谢您的帮助。 –