简体   繁体   中英

Zurb Foundation - dropdown not working

I am using a new Foundation version 6.2.2 and trying to make a dropdown menu in my top bar. I am calling the scripts like this:

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.3/jquery.min.js" integrity="sha384-I6F5OKECLVtK/BL+8iSLDEHowSAfUo76ZL9+kGAgTRdiByINKJaqTPH/QVNS1VDb" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/foundation/6.2.3/foundation.min.js"></script>
<script>$(document).foundation();</script>
<script src="{{ asset('js/app.js') }}"></script>

And this is my view where I have a dropdown menu:

<div class="top-bar">
  <div class="top-bar-left">
      <ul class="menu">
        <li><a class="btn btn-link" href="{{ url('/') }}"><img src="{{ asset('/img/logo.svg') }}" alt="logo"></a></li>
      </ul>
  </div>
  <div class="top-bar-right">
     <ul class="dropdown menu" data-dropdown-menu>
         <li>
           <img src="{{ asset('/img/gear.svg') }}" alt="settings">

           <ul class="menu vertical">
             <li><a href="">{{ Auth::user()->first_name }} {{ Auth::user()->last_name }}</a></li>
             <hr>
             <li>
                 <a href="/auth/logout">Logg ut</a>
             </li>
           </ul>
         </li>
     </ul>
   </div>
</div>

I get no errors in the console, and I have the same setup in other project that works fine, so I have no idea what is wrong with it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM