JSFiddle - React, Tailwind, and code Playground
by mpsingh2003
HTML
<input value="" autofocus/>
<button>CLick ME</button>
<div>Start</div>
JavaScript
$("button").click(function(e){
var x = $("div").text();
$("div").text(x + " click");
$("input").focus();
})
$("input").keydown(function(e){
if(e.keyCode == 13){
var x = $("div").text();
$("div").text(x + " key");
}
})
$("input").focus(function(e){
var x = $("div").text();
$("div").text(x + " focus");
})
$("button").blur(function(e){
var x = $("div").text();
$("div").text(x + " blur");
})