Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Foundation / jQuery not initialized - Uncaught ReferenceError: $ is not defined #3

Closed
Nimoi opened this issue May 12, 2017 · 1 comment

Comments

@Nimoi
Copy link

Nimoi commented May 12, 2017

I tried adding a responsive top-bar menu, the realized jQuery nor Foundation were available. To fix I added a bootstrap.js to /resources/assets/js/app:

// Window-bound objects.
window.$ = window.jQuery = require('jquery');

// External packages - order matters.
require('foundation-sites');

And added import './bootstrap'; to the top of /resources/assets/js/app/app.js. Seems like common sense now, but I assumed jQuery/Foundation would be available out of the box like in the admin panel.

@JVMartin
Copy link
Owner

Done, thank you!

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

No branches or pull requests

2 participants