JSFiddle - React, Tailwind, and code Playground
HTML
<input id="input1" type="text" value="0"/>
<input id="input2" type="text" value="0"/>
<button>Fire</button>
<pre></pre>
JavaScript
$(document).ready(function() {
function handler(e) {
$('pre').append(e.target.id + ' fired!' + '\n');
};
document.getElementById('input1').addEventListener('keyup', handler, true);
$('#input2').bind('keyup', handler);
$('button').click(function() {
$('input').trigger('keyup');
});
});