JSFiddle - React, Tailwind, and code Playground
by beneverard
HTML
<div class="wrap">
<div class="child1">
<a href="#" name="xyz">A link</a>
<div>
<div class="child2"></div>
<div class="child3">
<a class="anch" onclick="func1()">Another</a>
<a class="anch" onclick="alert('hello');">And another</a>
</div>
</div>
JavaScript
$('a[name=xyz]').on('click', function(event) {
event.preventDefault();
$(this).closest('.wrap').find('.child3 a').eq(1).trigger('click');
});