O
O
olya_0972020-04-15 10:34:00
JavaScript
olya_097, 2020-04-15 10:34:00

How to add fractional values ​​while moving through the asterisks?

i.e. .0 is gone
https://jsfiddle.net/tc8ynb6x/1/

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Somewhere Intech, 2020-04-15
@olya_097

Fix sections:

if ( ( exitPointY >= topEdge ) && ( exitPointY <= bottomEdge ) && ( exitPointX > (leftEdge + reasonableWidth) ) ) {
        $('#param' + id).text("5.0");

var rating = progress * 5 / width;
      rating = Math.max(Math.ceil(rating), 1);

      $('#param' + id).text(Math.ceil(rating).toFixed(1));

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question