1
I have a div father who in it occurs an event onclick in div but within that div I want to have an element that also has an event onclick that is triggered without triggering the onclick of div father, for example:
<div onclick="alert('div pai')">
<p>div pai</p>
<button onclick="alert('button')">click</button>
</div>
Jsfiddle: https://jsfiddle.net/6q3m8hv0/4/
What happens is when I click on button he calls the function of button and also that of div father, so the question is:
- It is possible to make the function of the
divfather is not called?