JSFiddle - React, Tailwind, and code Playground
HTML
<table class="first">
<tr><td>First table</td></tr>
</table>
<table class="second">
<tr><td>Second table</td></tr>
</table>
JavaScript
alert( $('table').eq(1).attr('class') )
<table class="first">
<tr><td>First table</td></tr>
</table>
<table class="second">
<tr><td>Second table</td></tr>
</table>
alert( $('table').eq(1).attr('class') )