Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Can anyone tell me why the dropdown button menu does not show?
!!! 5
%html{:lang => "en"}
%meta{:charset => "utf-8"}
%meta{:name => "viewport", :content => "width=device-width, initial-scale=1.0"}
=content_for?(:title) ? yield(:title) : "Analuk"
= stylesheet_link_tag "application"
= javascript_include_tag "vendor/modernizr"
= csrf_meta_tags
%nav{:class => "top-bar"}
%ul{:class => "title-area"}
%li{:class => "name"}
%h1= link_to "Analuk", root_path
%section{:class => "top-bar-section"}
-#Right Nav Section
= link_to "Right Nav Button Active", root_path
%a{:href => "#", :data => {"dropdown" => "drop"}, :class => "button dropdown"} Menu
%ul#drop.f-dropdown{"data-dropdown-content" => true}
%li= link_to "Edit profile", edit_user_registration_path
- if user_signed_in?
%li= link_to "Sign out", destroy_user_session_path
- else
%li= link_to "Sign in", user_session_path
-#Left Nav Section
- if user_signed_in?
%ul{:class => "left"}
%li= link_to "Profile", current_user
- else
%ul{:class => "left"}
%li= link_to "Sign in", new_user_session_path
-#Insert left sidebar here
= yield
-#Insert right sidebar here
= javascript_include_tag "application"

This comment has been minimized.

Copy link

JonKernPA commented Feb 5, 2014

For Foundation 5, try:{"data-options" => "is_hover: false", "data-topbar" => ""}

See foundation docs on Top Bar

Also, I found that I had to load foundation javascript after all of the jquery js files were loaded to get the drop-down to fire.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.