M
M
MisTFoR2021-07-08 19:32:37
JavaScript
MisTFoR, 2021-07-08 19:32:37

How to change another button/block when clicking on a button with a certain class?

There are a couple of buttons:

<button class="button active">
     <span>Кнопка</span>
</button>
<button class="button">
     <span>Кнопка</span>
</button>
<button class="button">
     <span>Кнопка</span>
</button>

I need that when a button with the class "active" is clicked, the buttons with the class "button" change, except for the button itself (which was clicked).

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
TheSnegok, 2021-07-08
@TheSnegok

https://www.w3schools.com/howto/howto_js_toggle_cl...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question