access next tr

access next tr

by Hilarius Doren

HTML

<table>
    <tr>
        <td>
            <select>
                <option>a</option>
                <option>b</option>
                <option>c</option>
            </select>
        </td>
    </tr>
    <tr>
        <td>the row
            <td>
    </tr>
    <tr>
        <td>not the row
            <td>
    </tr>
</table>

JavaScript

$("option").closest("tr").next('tr').css('color', 'red');