
React
- 1 ответ
- 0 вопросов
1
Вклад в тег
const button1 = document.querySelector('.sidebar__button');
const field = document.querySelector('.field');
const menu = document.querySelector('.menu');
button1.addEventListener('click', () => {
menu.classList.replace('active' , 'hidden');
});
field.addEventListener('click', () => {
menu.classList.replace('hidden', 'active');
});
<div class="header">...</div>
<div class="header">
<div class="header__bottom">...</div>
</div>
<div class="header header_christmas">...</div> <!-- Christmas edition of the header -->