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

Bence Szabó
Bence Szabó
5,885 Points

Overlay was good with black background, doesn't work with rgba values.

My overlay was working when the background was black and the display wasn't none. Now I changed the background to rgba(0,0,0,0.7) just like in the video, and put display: none; at the end. Doesn't work. What could be the problem?

<code>

overlay {

background: rgba(0,0,0,0.7);
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
display: none;

} </code>

Edit: I checked the console and got this error message: Uncaught TypeError: $overlay.show is not a function

This problem is your css "overlay". overlay is the one "ID". you try write #overlay, and refresh your workpaces.

2 Answers

Bence Szabó
Bence Szabó
5,885 Points

I think I've just got the problem, it seems to been a syntax error, I forgot the pharenteses around the $overlay variable's value.

Bence Szabó
Bence Szabó
5,885 Points

Josue Polo, There is the # tag, only the forum form makes it disappear. I'm still kind in trouble to post codes into treehouse forums. Btw. I managed to find to problem. :) Thanks, have a nice day!

Hi Bence,

This thread will help you with posting code in the forums: https://teamtreehouse.com/forum/posting-code-to-the-forum