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

Ozgur Parlakkilic
Ozgur Parlakkilic
8,399 Points

Doesnt seem to be working on my browser chrom

I dont know what i am doing wrong but I am not getting the same results.

$("#imageGallery a").click(function(event){ event.preventDefault(); var href = $(this).attr("href"); console.log(href);

<body> <h1>Image Gallery</h1> <ul id="imageGallery"> <li><a href="images/refferal_machine.png"><img src="images/refferal_machine.png" width="100" alt="Refferal Machine By Matthew Spiel"></a></li> <li><a href="images/space-juice.png"><img

Steven Parker
Steven Parker
231,269 Points

The code does not appear to be complete. It might be better if you make a snapshot of your workspace and post the link to it here.

Also, when posting code, use the instructions for code formatting in the Markdown Cheatsheet pop-up below the "Add an Answer" area. :arrow_heading_down:

3 Answers

Steven Parker
Steven Parker
231,269 Points

You just have a typo.

On the first (non-comment) line of your JS code, you wrote "overlay" instead of "$overlay" (with a dollar-sign).

Ozgur Parlakkilic
Ozgur Parlakkilic
8,399 Points

Thank you soo much dude, I knew it had to be a typo and I looked everywhere.. I though geez right on the first line too, I guess I am just Grinding too hard. Thanks again