JSFiddle - React, Tailwind, and code Playground

by xalvin11

HTML

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

JavaScript

$(document).ready(function () {
    $(':input').on('keypress', function (e) {
        if (e.which === 13) {
            var inputs = $(':input');
            inputs.eq(inputs.index($(this)) + 1).focus();
        }
    });
});