Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialZilu Cao
Courses Plus Student 2,703 PointsWhy don't load jQuery files in the footer of the site as what assumed to be the best practice?
In the video you put jQuery files link in the head section in order to make sure that it appears before bootstrap.min.js
1 Answer
Victor Tsang
1,592 PointsFrom what I read from stackoverflow, you load jQuery at the top because there might be plugins that add inline jQuery code at the head. I would assume a plugin that adds Google tracking code to the beginning of the head would be one case, but not sure if that uses jQuery.
Christopher Denny
10,460 PointsChristopher Denny
10,460 PointsThere are two good practices: 1) Keeping it in the header then telling it to run on document ready, or 2) Place it at the end of the body.