M P
M P

Reputation: 98

Foundation 6 - Dropdown items do not activate links when clicked

Context: I have created a top-bar menu using Foundation 6 (following the docs), with it displayed horizontally on large screens, and as a responsive vertical menu on medium and down. There is one item with children which is displayed as a dropdown on large screens, and as a drilldown menu on medium screens and below.

I created the site using the Zurb 'Yeti Launch' app, so as far as I can tell, I have all js libraries included.

Issue: Nothing happens when either the dropdown parent or any of the child items are clicked. Any help getting to the bottom of this is much appreciated!

My markdown for the menu is as follows:

<div class="top-bar" id="main-menu">
    <div class="row">
      <div class="large-12 columns">
        <div class="top-bar-left">
          <ul class="menu vertical large-horizontal" data-responsive-menu="drilldown large-dropdown">
            <li><a href="/index.html">Home</a></li>
            <li><a href="#">What's On</a></li>
            <li><a href="/listen-again.html">Listen Again</a></li>
            <li><a href="#">Community</a></li>
            <li>
              <a href="/brochure.html">About</a>
              <ul class="menu vertical">
                <li><a href="/presenters.html">Presenters</a></li>
                <li><a href="">Volunteers</a></li>
                <li><a href="">The Board</a></li>
              </ul>
            </li>
            <li><a href="/brochure.html">Get Involved</a></li>
            <li><a href="/contact.html">Contact</a></li>
          </ul>
        </div>
      </div>
    </div>
  </div>

Upvotes: 2

Views: 195

Answers (1)

Shoaib Iqbal
Shoaib Iqbal

Reputation: 1178

Did you added the init code?

$(document).foundation();

The CodePen example with the same HTML as you provided worked. http://codepen.io/shoaibik/pen/PNravB

Update: It look likes you can called Foundation JS and jQuery second time in app.js file, Please remove once instance and confirm again.

Upvotes: 1

Related Questions