Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial


Zurb foundation topbar dropdowns not working

I am working on a project that uses zurb foundations. I'm using there dropdown lists to view links. The topbar is white as opposed to its default black. When I click on the dropdown element in my localhost the lists doesnt appear. Why is this?

<div class='navbar'>
<nav class="top-bar" data-topbar>
    <section class="top-bar-section text-center">
        <ul class="">
            <li class="small-1"><%= link_to(root_path) do %>Home<% end %></li>
            <li class="small-1 has-dropdown"><a href="#">Profile</a>
                <ul class="dropdown">
          <li><a href="#">View All</a></li>
          <li><a href="#">Your Profile</a></li>
          <li><a href="#">Edit Profile</a></li>
            <li class="small-1"><a href="#">Projects</a></li>
            <li class="small-1"><a href="#">Stories</a></li>
            <li class="small-1"><a href="#">Forums</a></li>
            <li class="small-1"><a href="#">Events</a></li>
            <li class="small-4 has-form">
              <div class="row collapse">
                <div class="small-8 columns">
                  <input class="radius" type="text" placeholder="&#x2315 Find Stuff">
                <div class="small-4 columns">
                <a href="#" class="secondary button radius expand">Search</a>
            <li class="small-1"><a href="#" class="menu-icon">&#9776</a></li>
            <li class="small-1 has-dropdown"><a href="#">&#9881</a>
                <ul class="dropdown">
                    <li><a href="#">Change Password</a></li>
                    <li><a href="#">Account</a></li>

2 Answers

Chris Shaw
Chris Shaw
26,676 Points

Hi Tyler,

The top bar component is requires the foundation JavaScript in order to work, on the bottom of the top bar page they have an example of how to implement this JavaScript quickly by using the supplied scripts in the download.

Hope that helps.

Yes the foundation java script files are required in my java script manifest file and are rendered at the bottom of all my Web pages. Unless do I have to hand code some java script parameters to make this work?