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 Preparation

What specifically is a light box & what alternatives do we have to using one?

I'm assuming that Andrew's jQuery video proposing we use an effect(?) called light box pops up an image and darkens the background behind it, but is light box part of the jQuery library (that has a script underneath it that creates the effect that you just call)? Why are we using a light box vs. some other graphical effect? Is there any advantage(s)/disadvantage(s) to using the light box effect?

1 Answer

Steven Parker
Steven Parker
231,275 Points

:point_right: The advantage to a "light box" is that it is a familiar effect to most users.

There are certainly other ways to cause a single image among a set of them temporarily get more attention and become more visible. This is just a common one that users are likely to already be familiar and comfortable with.

There is no standard jQuery library function that implements a light box directly, but several of the jQuery functions can be useful in creating dynamic effects such as a light box (or many others).