JSFiddle - React, Tailwind, and code Playground

HTML

<span>
    <button id="test1">test</button>
</span>

JavaScript

$('#test1').trigger('click');

$('#test1').click(function() {
    alert('Boem')
});