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 trialAlex G.
10,329 PointsWhy not "call" the slick method in main.js?
I'm not really seeing the advantage of calling it in the HTML page... is this to prevent the other pages from slowing down? He didn't do that in the other videos.
2 Answers
Harley Urquhart
26,203 Pointsthere is no benefit to calling it in the HTML you can call it in main.js if you wish, Slick is a very forgiving carousel and can also be used via CDN. make sure to have it included after jquery though.
Jamie Reardon
Treehouse Project ReviewerAs the teacher says (around the 3:20 mark somewhere "ish"), he is only putting it on the one page, so he just went along with adding it directly to the HTML of the page. He is probably also showing you how to apply the jQuery and JS directly.