Hide div on body click or hide on anywhere click on body
jQuery(document).mouseup(function(e) {
var $container = jQuery("id or class of container you want to hide");
// if the target of the click isn't the container nor a descendant of the container
if (!$container.is(e.target) && $container.has(e.target).length === 0) {
$container.hide();
}
});
0 comments: