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

JavaScript jQuery Basics (2014) Creating a Simple Lightbox Perform: Part 3

Dead end??

Hi guys,

could you please explain me what does it mean "dead end"? I cannot understand!

Thanks

Steven Parker
Steven Parker
231,269 Points

Are you sure you linked the right video? I could not find that phrase in the transcript.

What's the time index where it is used?

1 Answer

rydavim
rydavim
18,814 Points

A dead end happens when you have directed the user to a page that has no navigation back to somewhere else, meaning you force the user to use something like their browser's back button in order to return to a page they can navigate.

In the case of this project, the default behavior when you click on the image links is to redirect to a page with the linked image only. We use preventDefault() to stop this behavior, and instead use the link to open the full size image in a nice lightbox. This way, the user gets to stay on our gallery page and doesn't have to keep going back and forth to view the images.

Steven Parker
Steven Parker
231,269 Points

Good explanation :+1: But is this actually mentioned in the video?

rydavim
rydavim
18,814 Points

Not the video attached to this question, no. It's actually brought up in this one at around 7:20. I just assumed that's what he was referring to based on the project goals.