JSFiddle - React, Tailwind, and code Playground
HTML
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<table id="tabela">
<thead>
<tr>
<th>#</th>
<th>Fantasia</th>
<th>Cidade</th>
<th>Email</th>
<th>Status</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>Cliente1</td>
<td>Santa Cruz do Sul/RS</td>
<td>[email protected]</td>
<td><a name="botaoExemplo" href="#" class="ativo">Ativo</a></td>
</tr>
<tr>
<td>2</td>
<td>Cliente2</td>
<td>Santa Cruz do Sul/RS</td>
<td>[email protected]</td>
<td><a name="botaoExemplo" href="#" class="inativo">Inativo</a></td>
</tr>
</tbody>
</table>
JavaScript
$(document).ready(function(){
$(this).find('#tabela a[name=botaoExemplo]').click(function() {
if ($(this).hasClass("ativo")) {
$(this).removeClass("ativo").addClass("inativo");
$(this).html("inativo");
}
else {
$(this).removeClass("inativo").addClass("ativo");
$(this).html("ativo");
}
});
});