figma_adp_tabl_02
This commit is contained in:
17
main.js
17
main.js
@@ -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 = 'Больше услуг';
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user