making a popup disapear/ close after clicking outside of the pop-up box

0
Hi there,   I would love to see a solution for the following case. When there is a pop-up opened, we can only close it by a close action inside a button.  But is there also a way to close the pop-up if you click outside of it?   
asked
1 answers
0

I don’t think such option is available out-of-the-box. But you can do it using JavaScript. Use JavaScript snippet widget to add JavaScript on the page where modal is displayed. Then you can do something like this to close the modal when clicked outside. You will need to add a custom class to your popup/modal, then call fadeOut on it. I guess it will work. Or you may try display = none. There are lot of JavaScript solutions available on the stack overflow. 
 

$("body").click(function(){ $(".popupClass").fadeOut(); });

 

answered