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 trialnagamani 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
6,160 Points1 Answer
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?