O
O
olya_0972020-04-16 21:52:47
JavaScript
olya_097, 2020-04-16 21:52:47

How to implement the correct count?

when instead of 150.00
I write 1 150, 00 separated by a space,
then there is an incorrect count

23 line for example
------------------------
+ in the second case
where 300 , 44
counts without fractions for some reason

https://jsfiddle.net/xsyLroe8/

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
rasschitai, 2020-04-16
@rasschitai

take unprocessed numbers, for example from data-* , and then render them

<p class="basket__single" data-val="300.44"><span>300, 44</span> грн.</p>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question