Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Can anyone tell me why the dropdown button menu does not show?
!!! 5
%html{:lang => "en"}
%head
%meta{:charset => "utf-8"}
%meta{:name => "viewport", :content => "width=device-width, initial-scale=1.0"}
%title
=content_for?(:title) ? yield(:title) : "Analuk"
= stylesheet_link_tag "application"
= javascript_include_tag "vendor/modernizr"
= csrf_meta_tags
%body
%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
%ul.right
%li.active
= link_to "Right Nav Button Active", root_path
%a{:href => "#", :data => {"dropdown" => "drop"}, :class => "button dropdown"} Menu
%br
%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
.row
.small-6.large-2.columns
-#Insert left sidebar here
.small-6.large-8.columns
= yield
.small-12.large-2.columns
-#Insert right sidebar here
= javascript_include_tag "application"
@JonKernPA

This comment has been minimized.

Copy link

commented Feb 5, 2014

For Foundation 5, try:

%nav.top-bar{"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.