Closing a pop-up page by clicking outside the pop-up window

1
Hi all, Is it possible to close a pop-up window when the user clicks outside the pop-up window? This would preferably trigger the default cancel action. Many thanks.
asked
2 answers
1

Hi Miguel,

This is not possible by default, did not try it myself but maybe you can try to add some custom JavaScript to achieve this?

 

answered
0

Hi,
Give the popup page itself a class,  and use this with a js snippet on the popup page.
Hope this puts you in the right direction. Not too sure about the default cancel action though.

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

 

answered