Answer the question
In order to leave comments, you need to log in
How to add a class and remove this class from other elements?
Hey! Need help. There are several elements. I click on one element - a class is added to it. I click on another element - a class is added to it, and this class is removed from the first element. Etc. And if I click on an element that already contains our class, then this class is removed from it.
here is the fiddle template: https://jsfiddle.net/s4e8g8pa/6/
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question