If I had two <div> elements like so:
<div class="overlay"></div>
<!-- Other content here -->
<div class="popup"></div>
When div.popup has display: block I would like div.overlay to also have display: block and likewise for display: none;
Instead of using an if statement to check whether div.popup if visible, I would like to have something like an event handler.
How would I do this using jQuery? Thanks.
 
    