say, I have
HTML:
<div onclick="parent()">
<div onclick="child()"></div>
</div>
SCRIPT: {
function parent() {
console.log("I'm your father");
}
function child() {
console.log("You're not my father");
}
In this situation, if I click child element, it's parent element is clicked also, so parent() child() both are called. How can I call child() only without it's parent being clicked?