简体   繁体   English

基础(3)Zurb下拉菜单问题

[英]Foundation (3) Zurb Drop Down Menu Issue

I have setup a basic "demo" page and am having trouble to get the Foundation Drop Down Menu to Function. 我已经设置了基本的“演示”页面,但无法使“基础”下拉菜单生效。 As you can see here, http://tinyurl.com/arhssm9 , Nav Item 2 has a dropdown option. 如您在此处所见, http://tinyurl.com/arhssm9 ,导航项目2具有下拉选项。 However, nothing happens. 但是,什么也没有发生。 I believe I have implemented the nav correctly and included the correct js files. 我相信我已经正确实施了导航,并包含了正确的js文件。 I would really appreciate for someone to tell me where I went wrong so I can keep on going with my project. 我真的很感谢有人告诉我我哪里出了问题,以便我继续进行我的项目。

Thanks! 谢谢!

You are missing the app.js . 您缺少app.js Just add it. 只需添加即可。

You can test running in your console: 您可以在控制台中测试运行情况:

$.getScript('https://raw.github.com/zurb/foundation/master/vendor/assets/javascripts/foundation/app.js');

Hope it helps. 希望能帮助到你。


EDIT 编辑

If you don't want to download extra JS, you can simply add something like: 如果您不想下载额外的JS,则只需添加以下内容:

var $doc = $(document);
$doc.ready(function(){
  $doc.foundationTopBar();
});

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM