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 trialAaron Selonke
10,323 PointsJust not processing the jQuery function
I also have know idea why it is not writing to the console. I looks exactly the same as on the video Tried the ctrl + F5 and cleared the chrome browser cache.
Here is the screen shot. http://picpaste.com/pics/Captureup-c7ZVbrr8.1456348134.JPG
1 Answer
0yzh
17,276 PointsHey Aaron,
Looks like you have a syntax error because you added an extra ) parenthesis.
$('#imageGallery a').click(function (event)) { // <--- syntax error extra parenthesis
event.preventDefault();
var href = $(this).attr('href');
console.log(href);
});
change it to this and you should be good to go:
$('#imageGallery a').click(function (event) {
event.preventDefault();
var href = $(this).attr('href');
console.log(href);
});