Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

JavaScript

Vlad Legkowski
Vlad Legkowski
9,882 Points

Initial state of overlay should be hidden

So, does it mean that we change 'remove'

display: none

after we are clicking

$("#ownersPictures a" ).click(function(event){ event.preventDefault(); var href = $(this).attr("href"); $overly.show();

});

I use code for my own project, and after applying display: none i dont get the overlay

Vlad Legkowski
Vlad Legkowski
9,882 Points

I found my mistake, $overly.show(); , but can someone explain me this - does .show() change css property display?

1 Answer

Steven Parker
Steven Parker
216,083 Points

Yes, the show and hide JQuery functions do change the display CSS property, and can optionally animate some of the other properties as well.

The JQuery API reference page has the complete documentation.