Spaces:
Running
Running
File size: 350 Bytes
503881f |
1 2 3 4 5 6 7 8 9 10 11 |
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');
});
}); |