-
Notifications
You must be signed in to change notification settings - Fork 73
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
jquery not loading #616
Comments
The starter integrated the css portion automatically but it does not load js automatically. What I did was Require the jquery and popper.js libraries.
And then import them where I needed it. e.g. import 'jquery/dist/jquery.min'
import 'popper.js/dist/popper.min'
import 'bootstrap/js/dist/util'
import 'bootstrap/js/dist/carousel' I think the documentation could be updated to explain this. |
@jaxx2104 Before you do, I found that the method I used above works during gatsby develop but not during gatsby build. I simply created a // Import all js dependencies.
import 'jquery/dist/jquery.min.js'
import 'popper.js/dist/popper.min'
import 'bootstrap/js/dist/util'
import 'bootstrap/js/dist/carousel'
import 'bootstrap/js/dist/dropdown' All this does is import these dependencies on all gatsby pages. Because these js utilities are used on most of my pages, I am okay with this. |
Thanks for this cool template. I'm trying to make the navbar toggler work, I don't see jquery loading anywhere, which I think is necessary. Is there a way to add that in or check if its working? Seems to be so in yarn when I installed all dependencies. Just doesn't seem to be doing anything in the browser. Thanks for any pointers.
The text was updated successfully, but these errors were encountered: