As my title explains, how can I make only the parent-div clickable?
HTML
<div id="canvas" onclick="closeCanvas()">
<img src="image.png" />
</div>
JQUERY
function closeCanvas(){
$("#canvas").fadeOut(300);
}
My issue is that when I click the "image", the function closeCanvas() is also trigged. How can I make only the parent, #canvas, triggerable?