Looking for some help with a jQuery issue. I have a pop-up that opens when a div is clicked, but I want it to close when clicking outside of the div instead of just on the close button.
<a class="close-up" href="#" onclick="popup('popUpDiv')" >X</a>
The div structure is as follows:
<div id="blanket" style="display:none;"><a class="close-up" href="#" onclick="popup('popUpDiv')" >X</a></div>
<div id="popUpDiv" style="display:none;"> <div class="main-navBar">kfbkasfkafkja</div> </div>
If anyone can assist with making the pop-up hide when clicking outside the div, it would be greatly appreciated. Thanks in advance...