const accordionButtons = document.querySelectorAll('.accordion-item');
console.log(accordionButtons);
for (let button of accordionButtons) {
button.addEventListener('click', () => {
accordionButtons.forEach(otherButton => {
if (otherButton !== button) {
otherButton.parentElement.classList.remove('active');
console.log('меню закрыто (другой пункт)');
}
});
button.parentElement.classList.toggle('active');
});
}
As an aspiring Front-End Developer, I am passionate about creating user-friendly and visually appealing web applications. My goal is to contribute to innovative projects by leveraging my strong learning ability and enthusiasm for mastering modern web technologies like HTML, CSS, and JavaScript. I prioritize continuous growth, collaboration, and delivering high-quality solutions. With a proactive mindset, I am eager to dive into new challenges, quickly adapt to emerging technologies, and build a strong foundation in front-end development.
Project Task list
Link to the project repository