Division smaller than $ 999.00 works correctly. However, greater than $ 999.00 results in NaN. How to stir it? I already put a replace and nothing!
$(document).ready(function() {
var demo1 = $('span.ecwid-productBrowser-price-value');
demo1.each(function() {
var valor1 = parseInt(this.innerHTML.replace(',', '.').substr(2) / 3, 10);
$(this).append("<p><i>dividido por 3 é: " + valor1 + "</i></p>")
})
demo1.append();
})
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js">
</script>
<body>
<span class='ecwid-productBrowser-price-value'>R$800,00</span><hr>
<span class='ecwid-productBrowser-price-value'>R$999,00</span><hr>
<span class='ecwid-productBrowser-price-value'>R$1.000,00</span><hr>
<span class='ecwid-productBrowser-price-value'>R$1.200,00</span><hr>
</body>