JSFiddle - React, Tailwind, and code Playground
HTML
<form id="myform">
<input id="firstfield" name="firstfield" value="100" type="text" />
<input id="secondfield" name="secondfield" value="200" type="text" />
</form>
CSS
#myform input[type="text"] {
border: 1px solid #DBDAD7;
box-shadow: 1px 1px 4px #F4F4F4 inset;
font-size: 14px;
height: 47px;
line-height: 46px;
padding: 0 10px;
margin: 0;
}
JavaScript
jQuery(document).ready(function() {
$('#firstfield, #secondfield').on({
"keydown": function(e) {
if (e.which == 9) {
alert("TAB key for " + $(this).attr("id") + " .keydown() called.");
}
},
"keyup": function(e) {
if (e.which != 9) {
alert("Handler for " + $(this).attr("id") + " .keyup() called.");
}
}
});
});