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
Richard Santana
5,305 PointsNot working correctly in Chrome, works fine with Edge
I ran the workspace with chrome many times, check for syntax errors and spelling errors , even made sure JavaScript was on. Still nothing. Ran it with Edge an everything works as expected. Can anyone tell me what's going on ?
I went to stack overflow, and only found syntax errors.
$("#imageGallery a").click(function(event){
event.preventDefault();
var href = $(this).attr("href");
console.log(href);
});
Richard Santana
5,305 Pointsevent.preventDefault();
Jennifer Nordell
Treehouse TeacherRichard Santana I'm not sure it will help, but I found this on stack overflow. And no, it's not syntax errors.
http://stackoverflow.com/questions/18389046/event-preventdefault-does-not-work-in-chrome-and-opera
Richard Santana
5,305 PointsNo, I read that one before. I am trying to prevent the browser from following the link , its an exercise in the jquery basics lessons.
Jennifer Nordell
Treehouse TeacherJennifer Nordell
Treehouse TeacherWould it happen to be an alert() or prompt() that's not showing up as expected?