1$(document).mouseup(function(e) {
2 var $offCanvasInner = $(".off-canvas-inner");
3
4 // if the target of the click isn't the $offCanvasInner nor a descendant of the container
5 if (!$offCanvasInner.is(e.target) && $offCanvasInner.has(e.target).length === 0) {
6 if($('.off-canvas-wrapper').css('display') == "block"){
7 $('.off-canvas-wrapper').hide();
8 }
9 }
10
11});