T
T
toyvo_glumov2018-03-17 09:27:29
JavaScript
toyvo_glumov, 2018-03-17 09:27:29

How is a changeable condition implemented in JS?

There is a set of checkboxes and, depending on the checkboxes, the condition should change.
For example, in the example following the link, it is necessary that if the 2nd and 5th checkboxes are checked, the circles A and E become red (a class is added), and if all are checked, then only D, etc.
https://codepen.io/mycodepenio/pen/eMdJWq

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Stalker_RED, 2018-03-17
@toyvo_glumov

https://codepen.io/anon/pen/EEgoZx?editors=0010
I had to rewrite a little, at the same time I threw out the binding to the id
This is of course not production ready, but for a start, I think it will work.

R
Rsa97, 2018-03-17
@Rsa97

For example, like this, https://codepen.io/anon/pen/eMdewb

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question