Spaces:
Running
Running
const dropdowns = document.querySelectorAll('.dropdown'); | |
dropdowns.forEach((dropdown) => { | |
const shortDesc = dropdown.querySelector('.short-description'); | |
const fullDesc = dropdown.querySelector('.full-description'); | |
// Toggle open class on click | |
shortDesc.addEventListener('click', () => { | |
dropdown.classList.toggle('open'); | |
}); | |
}); |