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 2

Chris Walker
Chris Walker
3,428 Points

why does the overlay fade out when you click on an image considering we set display none in the CSS file?

Great vids. Can you please explain why the overlay appears when you click on an image?

1 Answer

I'm not familiar with the code in this course but I am going to assume that the overlay is being displayed via jQuery.

The jQuery will override the current CSS of display:none to display block when an image is clicked.