简体   繁体   English

Zurb Foundation下拉菜单不适用于Meteor

[英]Zurb Foundation dropdown menu isn't working with Meteor

I'm trying to use a dropdown menu with Meteor, but it's now working. 我正在尝试对Meteor使用下拉菜单,但现在可以使用了。 I don't know if it's related with the packages that I have installed: 我不知道它是否与我安装的软件包有关:

https://atmosphere.meteor.com/package/zurb-foundation https://atmosphere.meteor.com/package/zurb-foundation

https://atmosphere.meteor.com/package/iron-router https://atmosphere.meteor.com/package/iron-router

https://atmosphere.meteor.com/package/accounts-entry https://atmosphere.meteor.com/package/accounts-entry

https://atmosphere.meteor.com/package/iron-router-progress https://atmosphere.meteor.com/package/iron-router-progress

Here is the dropdown example: 这是下拉示例:

<section class="top-bar-section">
        <ul class="right">
          <li class="has-dropdown">
            <a href="#">user</a>
            <ul class="dropdown">
              <li><a href="#">Contact</a></li>
              <li><a href="#">Friends</a></li>
            </ul>
          <ul class="dropdown">
              <li><a href="#">Contact</a></li>
            </ul>
          </li>
        </ul>
      </section>

What might be the problem? 可能是什么问题? The console prints this error: Uncaught TypeError: Cannot read property 'is_hover' of undefined 控制台显示此错误:Uncaught TypeError:无法读取未定义的属性'is_hover'

Thanks. 谢谢。

您可以在呈现的模板上执行$('document')。foundation('reflow'),如下所示: zf5.meteor.com

This works great using the zurb-foundation package you linked to: 使用链接到的zurb-foundation软件包,此方法非常有用:

  <section class="top-bar-section">
    <ul class="right">
      <li class="has-dropdown">
        <a href="#" data-dropdown="drop1">user</a>
        <ul id="drop1" class="f-dropdown" data-dropdown-content>
          <li><a href="#">Contact</a></li>
          <li><a href="#">Friends</a></li>
        </ul>
      </li>
    </ul>
  </section>

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

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