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

is that possible

hey i just created lightbox using jquery here is my code : http://codepen.io/mehra_as/pen/PZRmga

i just want to ask you that is this possible using jquery to block background click event until the overlay image is not closed

1 Answer

Probably the least complicated way would be to have a container div for the lightbox which 100% window size with some darkening of it's background and lowered opacity ( so that it is slightly transparent ). You will have to work on some kind of Close button implementation as well in order to remove the lightbox.

If you want to enhance it after that then you could create back and forward buttons so the user does not have to close the lightbox to view another picture in the gallery.

Best of luck and let us know what you come up with! :)

thanx good idea