JSFiddle - React, Tailwind, and code Playground

HTML

<table>
    <thead>
        <th id="foo">Header 1</th>
        <th id="bar">Header 2</th>
        <th id="quarters">Header 3</th>
        <th id="lala">Header 4</th>
        <th id="bobo">Header 5</th>
    </thead>
    <tbody>
        <td>value</td>
        <td>value</td>
        <td>value</td>
        <td>value</td>
        <td>value</td>
    </tbody>
</table>

JavaScript

var headerPosition = $("#quarters").prevUntil().size());
var headers = {};

headers[headerPosition] = "quarters";

$("table").tablesorter({
    headers: headers
});