JSFiddle - React, Tailwind, and code Playground
HTML
<div class="parent">
<a href="javascript:;" class="child">Child Link</a>
</div>
CSS
.parent {
width: 200px;
height: 100px;
text-align:center;
line-height: 100px;
background: #ccc;
}
JavaScript
$(function(){
function runFirst(){
alert("I should always run first");
}
function runSecond(){
alert("I should always run second");
}
$('body').on('click', '.parent', function(){
runFirst();
}).on('click', '.child', function(event){
runFirst();
runSecond();
event.stopPropagation();
});
})