$(document).click(function() { alert('clicked outside'); }); $(".menuWraper").click(function(event) { alert('clicked inside'); event.stopPropagation(); });