1
I have an event in Jquery that flags information from a table row (I’m using Jquery Datatables).
var linha = $(this).parents('tr')[0].innerHTML;
The value returned is this:
<td class="text-center sorting_1">118587</td>
<td class="font-w600">113326</td>
<td class="d-none d-sm-table-cell">JOÃO DA SIILVA(<b>68</b>)</td>
<td class="text-center">
<button id="btnIncluiVisitante" class="btn btn-primary">
<i class="fa fa-user-plus"></i><label for=""></label>
</button>
<button id="btnRemoveVisitante" class="btn btn-primary">
<i class="fa fa-user-times"></i>
<label id="qtdeVisitantes">1</label>
</button>
</td>
How do I get the value 1
that’s on the tag <i>
with id="qtdeVisitantes"
?
A tip: Avoid mixing Vanilla syntax with jQuery.
– LeAndrade