jquery check if user clicked outside div code example
Example: jquery check if clicked outside div
$(document).click(function() {
alert('clicked outside');
});
$(".menuWraper").click(function(event) {
alert('clicked inside');
event.stopPropagation();
});