It is a dumb question, but I can't figure it out..

I want to show the div smoothly (slide down) when a link is clicked and hide it (slide up) when any other part of the page is click or the page is scrolled.