chunpoon
chunpoon

Reputation: 970

Javascript source reference issue using Foundation

I'm using Flask and Python to develop a web app and was trying out Foundation. I've downloaded everything and put in my /static folder. In the head section I've added:

src="/static/js/vendor/modernizr.js"

But now, my dropdown menus show up but won't dropdown. They work again if I remove "/static/" from the src reference. But if I do that, my tabs stop working :S. Also my toggle-topbar doesn't seem to work no matter what I do.

My project is setup as

app/

--css/

----foundation.css

----foundation.normalize

--js/

----foundation/

----vendor/

templates/

--index.html

There's quite a bit of stuff in the html file so I put the index.html in a gist here

Upvotes: 0

Views: 80

Answers (1)

Andriy Horen
Andriy Horen

Reputation: 2950

Your folder structure has nothing to do with menu not being working. The issue is that you're missing data-topbar attribute in your navigation tag.

So line #14 should be changed from:

<nav class="top-bar">

to be:

<nav class="top-bar" data-topbar role="navigation">

This should fix dropdowns as well as menu-toggle. Please refer doc for more details - Foundation Topbar

Upvotes: 2

Related Questions