figma_adp_tabl_02

This commit is contained in:
2025-10-26 21:55:22 +03:00
parent d773318b8d
commit 5d57a462d1
3 changed files with 127 additions and 13 deletions

17
main.js
View File

@@ -59,3 +59,20 @@ document.addEventListener('DOMContentLoaded', () => {
});
});
});
// ----------------------------------------------------------ВЫПАДАЮЩЕЕ-МЕНЮ--------------------------------------------------------
document.querySelector('.header_nav_link-reverse').addEventListener('click', function() {
const dropdown = document.querySelector('.dropdown-list');
const text = this.querySelector('.link-text');
dropdown.classList.toggle('show');
// Меняем текст кнопки
if (dropdown.classList.contains('show')) {
text.textContent = 'Меньше услуг';
} else {
text.textContent = 'Больше услуг';
}
});