JSFiddle - React, Tailwind, and code Playground

by Aljohn Acal

HTML

<form action="#">
    <table>
    <thead>
        <tr>
        <th>Input 1</th>
        <th>Input 2</th>
        <th>Input 3</th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td>
                <input name="one"/>        
            </td>
            <td>
                <select name="select">
                    <option>asd</option>
                    <option>asd</option>
                </select>
               <input name="two"/> 
               <input name="three"/> 
            </td>
            <td>
               <input name="four"/>
            </td>
        </tr>
                <tr>
            <td>
                <input name="field-one"/>        
            </td>
            <td>
                <select name="select">
                    <option>asd</option>
                    <option>asd</option>
                </select>
               <input name="field-two"/> 
               <input name="field-three"/> 
            </td>
            <td>
               <input name="field-four"/>
            </td>
        </tr>
    </tbody>
    </table>
</form>

JavaScript

$("input").bind("keydown", function(event) {
    if (event.which === 13) {
        event.stopPropagation();
        event.preventDefault();
        $(this).nextAll("input").eq(0).focus();
    }
});