js propagation stop
$("span").click(function(event){
event.stopPropagation();
alert("The span element was clicked.");
});
$("p").click(function(event){
alert("The p element was clicked.");
});
$("div").click(function(){
alert("The div element was clicked.");
});
4.17
6
<div (click)="func($event)">
<span>oi</span>
</div>
func(e?)
{
if(e) e.stopPropagation();
}
Thank you!
6
0
3.71
7
<div (click)="func($event)">
<span>oi</span>
</div>
func(e?)
{
if(e) e.stopPropagation();
}
Thank you!
7
0
Are there any code examples left?
New code examples in category Javascript