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 trialDaniele Manca
Courses Plus Student 7,548 PointsLightbox perfect code challenge from Jquery basics
Hello folks,
I am not quite sure I understand what the following task is asking:
"Oh no! When you click on an image the browser follows the link. Fix it."
Could someone help please?
Thanks.
1 Answer
Marcelo Retana
2,534 PointsRemember to set up the preventDefault();
$("#imageGallery a").click(function(event){
event.preventDefault();
var imageLocation = $(this).attr("href");
you must focus on line 19.
Cheers
Yosef Ali
15,182 PointsYosef Ali
15,182 PointsMarcelo, Thanks!