Zurb Foundation 5 toggle-topbar not working

zurb-foundation

Solution

The problem appears to be in the Foundation.topbar.js file. The following section of code

breakpoint : function () {
        return matchMedia(Foundation.media_queries['medium']).matches;
    }

needs to be changed to

breakpoint : function () {
        return !matchMedia(Foundation.media_queries['topbar']).matches;
    }

Problem

Just switched my rails project to test Zurb Foundation 5 and now the toggle-topbar menu is not working. When the viewport is small, the top bar menu items disappear and the menu icon is displayed as before, but when I click on the menu icon nothing occurs. I have the following code to display a top-bar menu. ``` <nav class="top-bar"> <ul class="title-area"> <li class="name"></li> <li class="toggle-topbar menu-icon"> <a>{href: "#"} <span>Menú</span></a> </li> </ul> <section class="top-bar-section"> <ul class="left"> <li> <a class="i fi-home">{href: "/ui/home"} &nbsp;Inicio</a></li> <li> <a>{href: "/ui/wine_reviews"} Críticas de Vinos</a></li> <li> <a>{href: "/ui/wine_tastings"} Catas y Maridajes</a></li> <li> <a>{href: "/ui/blogs"} Noticias</a></li> </ul> <ul class="right"> <li> <a>{href: "#"} <i class="fi-lock"></i> &nbsp;Club TastaVi</a></li> </ul> </section> </nav> ``` It's a top-bar menu contained in my grid.

Original source

Related problems