JSFiddle - React, Tailwind, and code Playground
HTML
<table>
<tr>
<td class="last">last</td>
<td></td>
</tr>
<tr>
<td class="last">last</td>
<td></td>
</tr>
<tr>
<td class="another">another</td>
<td></td>
</tr>
<tr>
<td class="another">another</td>
<td></td>
</tr>
</table>
CSS
.last{
display: block;
background-color: red
}
.another{
display: block;
background-color: black;
color: white
}
JavaScript
$('td').each(function(){
if ($(this).hasClass('another')) {
$(this).insertBefore($('td:first'))
}
})