nicolabosco87
8/7/2017 - 8:03 AM

Click outside div

Click outside div

$(document).click(function(event) { 
    if(!$(event.target).closest('#menucontainer').length) {
        if($('#menucontainer').is(":visible")) {
            $('#menucontainer').hide();
        }
    }        
});