figma_003

This commit is contained in:
2025-10-23 20:19:08 +03:00
parent 33972c487b
commit 11e2c01e2d

View File

@@ -1,5 +1,10 @@
// -----------------------------------------HEADER----------------------------------------------------------- // -----------------------------------------HEADER-----------------------------------------------------------
const headers = document.querySelectorAll('.header_top_item');
if(headers.length > 0) {
headers[0].classList.add('active');
}
document.querySelectorAll('.header_top_item').forEach((item) => { document.querySelectorAll('.header_top_item').forEach((item) => {
item.addEventListener('click', (e) => { item.addEventListener('click', (e) => {
e.preventDefault(); // если не нужно переходить со страницы e.preventDefault(); // если не нужно переходить со страницы
document.querySelectorAll('.header_top_item').forEach(el => el.classList.remove('active')); document.querySelectorAll('.header_top_item').forEach(el => el.classList.remove('active'));