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 trialJanise Bradford
5,664 PointsUsing Modernizr
I downloaded Modernizr and then moved the file to my project js file. When first downloaded since the file name is different than the one in the html file, should the file name be changed to js.modernizr.js or should the first js be not included?
It's not showing up in the dev tools. Some sort error -- file not found.
Trying to figure out how to get file to show up in dev tools for Chrome.
Any help would be so appreciated!
1 Answer
Dustin Matlock
33,856 PointsHi Janise, the js
part is a folder in your project where JavaScript files usually go. It's not required to put scripts in their own folder, but it's a good way to organize your files and a common practice. If you haven't already, you might check out / review this video for linking files in HTML documents.
To include Modernizr in your project, it has on go in each of the HTML documents you want to use it on like this:
<script src="js/modernizr-1.0.min.js"></script>
You can create a folder in the root of your project called js
, place Modernizr inside it, and you'll be ready to use the code snippet above.
For more information, check out How to use Modernizr, and the official documentation.
Janise Bradford
5,664 PointsJanise Bradford
5,664 PointsThanks Dustin, the js file that was with my project files was empty. So it wasn't showing up in the dev tools.
I think there was a js script for modernizr in the html file but it's just that the js file located in the start folder was empty. Tried downloading it myself but still wouldn't work
l'll check it out tomorrow so thank you.
I definitely need to revisit this lesson to figure this out.
Dustin Matlock
33,856 PointsDustin Matlock
33,856 PointsYou're very welcome. Let us know if you need anymore help.