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.

CSS CSS Layout Techniques Flexbox Layout Providing Fallbacks with Modernizr

Janise Bradford
Janise Bradford
5,664 Points

Using 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

Hi 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
Janise Bradford
5,664 Points

Thanks 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.

You're very welcome. Let us know if you need anymore help.