0
How to get not clicked elements
When I click on an element I want apply some event on all elements exept on clicked element. Please tell if anyone know
1 ответ
+ 1
If you use similar elements(with the same class or tag), you can make a function that loops through everything, making the change that you need(background color for example), then after the loop is done, you can use something like this:
this.style.background="red"
Then you will have all the elements changed, and the one you clicked changed back