JSFiddle - React, Tailwind, and code Playground
HTML
<span onclick="alert('Boem')">
<button id="test1">test</button>
</span>
JavaScript
$(function(){
$('#test1').click(function(e){e.preventDefault();}).click();
});
<span onclick="alert('Boem')">
<button id="test1">test</button>
</span>
$(function(){
$('#test1').click(function(e){e.preventDefault();}).click();
});