JSFiddle - React, Tailwind, and code Playground
by Nick Craver
HTML
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/dot-luv/jquery-ui.css">
<button id="my">Test</button>
JavaScript
$('button#my').click(function(event) {
if(event.which) {
alert("User click");
} else {
alert("triggered click");
}
});
$('button#my').click();