JSFiddle - React, Tailwind, and code Playground
HTML
<input type='checkbox' id='try' >try
<button id='click'>Click</button>
JavaScript
var mouseover = false;
$("#try").change(function(event) {
if (!mouseover) {
alert('not human')
} else {
alert(' human');
}
});
$("#try").mouseenter(function(event) {
mouseover = true;
});
$("#try").mouseleave(function(event) {
mouseover = false;
});
$('#click').click(function(event) {
$("#try").click();
});