JSFiddle - React, Tailwind, and code Playground
by bobbyrne01
HTML
<button id="test">
hey
</button>
<button id="my">
hey
</button>
CSS
#my:hover {
color: red;
}
#my:focus {
color: red;
}
JavaScript
setTimeout(function() {
document.getElementById('my').focus();
}, 1000);