I have a shopping cart where it provides the following information:
<tr class="rem1">
<td class="invert">R$<span id="produto">270,00</span></td>
</tr>
<tr class="rem2">
<td class="invert">R$<span id="produto">280,00</span></td>
</tr>
<tr class="rem3">
<td class="invert">R$<span id="produto">290,00</span></td>
</tr>
Would you like to know how I can click the value of these products? I tried this way:
$('.value-plus').on('click', function() {
valor = document.getElementById("produto").innerHTML;
trocar = valor.replace(",", ".");
alert(trocar);
}
But when I click, it only comes with the first product (200.00).