I am using this code:
$(\'body\').click(function() { $(\'.form_wrapper\').hide(); }); $(\'.form_wrapper\').click(function(event){ event.stopPropagatio
Attach a click event to top level elements outside the form wrapper, for example:
$('#header, #content, #footer').click(function(){ $('.form_wrapper').hide(); });
This will also work on touch devices, just make sure you don't include a parent of .form_wrapper in your list of selectors.