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![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
![nagamani palamuthi](https://secure.gravatar.com/avatar/853b27208e624718c4f868eb85a8fd4f?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
nagamani palamuthi
6,160 PointsHi the overlay was working fine in my last lesson , now after coding for img src the img shows up in left side of
browser(using chrome) . the background is just blank except for the clicked img. is something wrong with my code?
![nagamani palamuthi](https://secure.gravatar.com/avatar/853b27208e624718c4f868eb85a8fd4f?s=60&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
nagamani palamuthi
6,160 Points1 Answer
![Iain Simmons](https://secure.gravatar.com/avatar/89ea1833e0ffaf51eb0ef0cf15fa3203?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Iain Simmons
Treehouse Moderator 32,305 PointsOn line 22 of app.js
you're missing a comma in between the two arguments to the attr
method, the first being the attribute you want to update and the second being the value you want to set it to. Also, on line 24 you're trying to log href
, which won't be defined. You're probably wanting to log imageLocation
.
// Update overlay with the image linked in the link
$image.attr("src" imageLocation);
console.log(href);
Ford Heacock
18,068 PointsFord Heacock
18,068 PointsCan you paste your code so we can check it out?