Reputation: 1821
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.
Upvotes: 0
Views: 474
Reputation: 689
don't forget to include the css:
(6.2.2) https://cdnjs.cloudflare.com/ajax/libs/foundation/6.2.2/foundation.min.css
(6.2.3) https://cdnjs.cloudflare.com/ajax/libs/foundation/6.2.3/foundation.min.css
Upvotes: 0