$(document).click(function(e) { if ( $(e.target).closest('.navigation').length === 0 ) { // hide menu here } });