Menu icon Foundation
topbar Dropdown

Hello.

I am building a new Ruby on Rails app, where I am using Foundation for the first time. I am also using haml, for the first time, which is quite a challenge, but I really like both so far. I have however run into a little problem with the dropdown button that Foundation offers. I have tried for several days to fix it now, but with no luck.

The problem is, that in the top bar, the drop down button does not appear, when I use the code in the gist that I have attached. Any help would be much appreciated. I tried using the HTML provided by the Foundation site for dropdown buttons as well, but with no luck.

https://gist.github.com/czepluch/7883205

dropdownbuttontopbarruby

Hello.

I am building a new Ruby on Rails app, where I am using Foundation for the first time. I am also using haml, for the first time, which is quite a challenge, but I really like both so far. I have however run into a little problem with the dropdown button that Foundation offers. I have tried for several days to fix it now, but with no luck.

The problem is, that in the top bar, the drop down button does not appear, when I use the code in the gist that I have attached. Any help would be much appreciated. I tried using the HTML provided by the Foundation site for dropdown buttons as well, but with no luck.

https://gist.github.com/czepluch/7883205

[email protected] almost 6 years ago

I think you need a bit more in your nav div code (if you are on Foundation 5) to follow their recommended practices...

%nav.top-bar{"data-options" => "is_hover: false", "data-topbar" => ""}
  %ul.title-area
    %li.name
      %h1= "IQX"

  %section.top-bar-section
    %ul.right
      %li.has-dropdown
        %a{href: "#"} Right Button with Dropdown
        %ul.dropdown
          %li
            %a{href: "#"} First link in dropdown
        = render 'layouts/navigation_links'
    %ul.left
      %li= link_to 'Dashboard', root_path
      %li.divider