I'm a front-end web developer working on my first serious rails project (v3.2.8). I've successfully installed Foundation version 3.2.0 using the gem.
I am having trouble with the navigation toggle, which appears on smaller screen sizes and is used to expand and collapse the navigation links. When I click on it, it does nothing.
(You can see the documentation for the responsive zurb nav on their website: http://foundation.zurb.com/docs/navigation.php).
The code in question is:
<nav class="top-bar">
<ul>
<li class="toggle-topbar">
<a href="#"></a>
</li>
</ul>
<section>
<ul class="right">
<li class="has-dropdown">
<%= link_to "#{@user.email} | #{@user.credits_count}",
dashboard_path, :class => 'first-link' %>
<ul class="dropdown">
<li>
<a href="#">Settings<i class="icon-cog"></i></a>
</li>
<li>
<a href="#">Downloads<i class="icon-cloud-download"></i></a>
</li>
<li>
<a href="#">Subscription<i class="icon-calendar"></i></a>
</li>
<li>
<%= link_to 'Purchase Credits <i class="icon-money"></i>'
.html_safe, credits_path %>
</li>
<%= render "shared/menu_bar" %>
</ul>
</li>
</ul>
</section>
</nav>
The odd part is, when I remove:
<ul>
<li class="toggle-topbar">
<a href="#"></a>
</li>
</ul>
... Everything works as it should, but the first link:
<%= link_to "#{@user.email} | #{@user.credits_count}",
dashboard_path, :class => 'first-link' %>
... appears twice - Once where the actual toggle arrow should be and again once you click it to expand the navigation links.
Why would the navigation work properly when the toggle is not in the code and malfunction when it is?
Any help would be greatly appreciated.