JSFiddle - React, Tailwind, and code Playground
by darcyclarke
HTML
<div>
<input type="text">
</div>
<span>Focus</span>
CSS
div {
position:relative;
height: 30px;
margin-top: -30px;
}
div input {
height: 25px;
}
span {
font-size: 100px;
}
JavaScript
var animate = function(){
setTimeout(function(){
$('input').focus();
}, 500);
}, focus = function(){
inception();
}, inception = function(){
$('input').focus();
};
$('span').on('click', function(){
animate();
});