JSFiddle - React, Tailwind, and code Playground
HTML
<div><a href="">link</a> div</div>
<button><a href="">link</a> button</button>
JavaScript
$('div').on('click',function(e){
alert('div');
});
$('div a').on('click',function(e){
e.stopPropagation();
alert('div a');
return false;
});
$('button').on('click',function(e){
alert('button');
});
$('button a').on('click',function(e){
e.stopPropagation();
alert('button a');
return false;
});