1
I have a shopping cart where you bring 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 to click on the value of these products? I tried so:
$('.value-plus').on('click', function() {
valor = document.getElementById("produto").innerHTML;
trocar = valor.replace(",", ".");
alert(trocar);
}
But when I click, brings only the first product (200,00).
Thank you all very much. All solutions put here worked.
– user24136