JSFiddle - React, Tailwind, and code Playground

by Luke Marlow

HTML

<script src="https://code.jquery.com/jquery-2.2.3.min.js"></script>
<input type="text" name="name">
<div class="div"></div>

JavaScript

$('input[name="name"]').focus(function() {
	$('.div').html('focused')
}).blur(function() {
  $('.div').html('blurred');
}).keydown(function() {
  $('.div').html('key down');
}).keyup(function() {
  $('.div').html('key up');
});