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 trial

JavaScript jQuery Basics (2014) Creating a Simple Lightbox Perform: Part 2

farid mostafa
farid mostafa
4,478 Points

when i run the code it don't work and i think that there is something wrong with the jquery CDN please help

jquery cdn

Malachi Danielewicz
Malachi Danielewicz
16,559 Points

You want to add the jQuery CDN link to the <head> section of your html document.

<head>
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
  <script src="Your_JS_File_Here"></script>
</head>

If that doesn't work, copy and paste your code so we can see what you might be having trouble with.

I hope this helps!

Danny Burns
Danny Burns
Courses Plus Student 8,780 Points

Can you include your code so we can see what may be missing?

For the record, you do NOT want to add the jQuery CDN link to the <head> section of your HTML document. This has been covered time and time again. Although you can, there are inherent issues with doing so, and thus it's considered best practice to include in the lower body of your document.