I am aware this question has been asked before and i have read up on the subject, but still the solution isn't clear to me. And my attempts fails.
<div class="subtotal" data-content="€">30.50</div>
but with the following jquery js it reads 30.509
test = parseFloat($('.subtotal').text());//reads 30.509
i tried
test = parseFloat(Number($('.subtotal').text()).toFixed(2));//gives NaN
How do i make sure javascript reads the subtotal as 30.50 and not 30.509?
Regards,