JSFiddle - React, Tailwind, and code Playground

HTML

<input type="text"/> 
<input type="text"/>
<br />
<input type="text"/>

JavaScript

$('input,textarea').keypress(function(e){
    alert(e.keyCode);
  if(e.keyCode==13) {
   $(this).nextAll('input,textarea').first().focus();
  }
});