Y
Y
yazhog2016-06-15 23:49:04
JavaScript
yazhog, 2016-06-15 23:49:04

How to change positions in a group of sliders when one of them changes?

The form has sliders with a choice of values ​​in percentage.
Accordingly, there are 4 numerical variables. Their sum should not exceed 100.
When one variable changes upwards, the other values ​​should dynamically decrease.
I can't figure out how to implement it for an hour.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Denis Bukreev, 2016-06-16
@denisbookreev

Well, duck, you take the number by which the first one increased/ decreased ,
divide by 3 (since there are three more values) and distribute/take away each variable according to the result . , 20, 47.3333 and 4.3333

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question