JSFiddle - React, Tailwind, and code Playground
HTML
<input id="input0" autofocus>
<input id="input1">
JavaScript
$('#input0').bind({
blur: function () { console.log('blurred input0'); },
keyup: function (e) {
if (e.which === 38) {
// UP -> jquery
$('#input1').focus();
} else if (e.which === 40) {
// DOWN -> DOM
document.getElementById('input1').focus();
}
}
});
$('#input1').bind({
focus: function () { console.log('focused input1'); }
});