I am using this code:
$(\'body\').click(function() { $(\'.form_wrapper\').hide(); }); $(\'.form_wrapper\').click(function(event){ event.stopPropagatio
var n = 0; $("#container").mouseenter(function() { n = 0; }).mouseleave(function() { n = 1; }); $("html").click(function(){ if (n == 1) { alert("clickoutside"); } });