Skip to content
This repository has been archived by the owner on Oct 11, 2023. It is now read-only.

JavaScript error when importing as resources #11

Open
squarepegsys opened this issue Jan 15, 2015 · 0 comments
Open

JavaScript error when importing as resources #11

squarepegsys opened this issue Jan 15, 2015 · 0 comments

Comments

@squarepegsys
Copy link

It seems that the bundling of the the Foundation Javascript is causing it not to load correctly.

I have the following in my layout:

<r:require modules="foundation-css,jquery,foundation-js,foundation-topbar-js"/>

<g:layoutHead />
<r:layoutResources />

When I load the page, I get this in the JS Console:

    Uncaught ReferenceError: Foundation is not defined

and the mobile menu does not work.

If I remove the Foundation JS and use a CDN like below:

<g:layoutHead />
<r:layoutResources />

<script src="https://cdnjs.cloudflare.com/ajax/libs/foundation/5.5.0/js/foundation/foundation.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/foundation/5.5.0/js/foundation/foundation.topbar.min.js"></script>

I don't get that error and the mobile menu is fine.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant