Popup to close on click of a button

What I want to do is, instead of popup close button on top, when user clicks on a link it closes the popup. Tried jquery but didnt work.