I am using this code:
$(\'body\').click(function() { $(\'.form_wrapper\').hide(); }); $(\'.form_wrapper\').click(function(event){ event.stopPropagatio
$('body').click(function(event) { if (!$(event.target).is('p')) { $("#e2ma-menu").hide(); } });
p is the element name. Where one can pass the id or class or element name also.
p