I\'d like to detect a click inside or outside a div area. The tricky part is that the div will contain other elements and if one of the elements inside the div is clicked, i
you can apply if check for that inside your click event
if(event.target.parentElement.id == 'yourID')