Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

JavaScript Using jQuery Plugins Add a Sticky Navigation Bar Review jQuery Plugin Options

rdaniels
rdaniels
27,258 Points

Having trouble with question 5/5 of challenge. Any help will be appreciated. <script src=" ??????" ....

a file, in a file, in the root.....

1 Answer

Jason Anders
MOD
Jason Anders
Treehouse Moderator 145,728 Points

Hey Rodney,

The questions in quizzes always change order, but I think this is the one you are asking about:

"Say you want to link to the sticky plugin's JavaScript file. Assume that the plugin's name is jquery.sticky.js and that it is inside a folder named sticky, which is inside another folder named js at the root of your site. Finish the code below to link the script to the site's index.html file"

If you think of your file structure, the root is at the 'base' of the structure. The reason the challenge makes sure to point out that it is located in the 'root' is because your index.html is also at the root of your file structure. Because both the file your are linking to and the file using the link are both at the root of the structure, you only need to use the actual location (using / to separate folders), so for this one, it would be

<script src="js/sticky/jquery.sticky.js></script>

Hope this helps. Keep coding! :)

rdaniels
rdaniels
27,258 Points

I figured out the answer, but your response was right on. I marked your answer as "Best Answer"! Thank you for your help and very quick response!