14 lines
313 B
JavaScript
14 lines
313 B
JavaScript
{68d6b5c33d836cca88b676d5811c8d0524b2635c true 313 script.js 0xc001fc1dc0}
const panels = document.querySelectorAll('.panel')
|
|
|
|
panels.forEach(panel => {
|
|
panel.addEventListener('click', () => {
|
|
removeActiveClasses()
|
|
panel.classList.add('active')
|
|
})
|
|
})
|
|
|
|
function removeActiveClasses() {
|
|
panels.forEach(panel => {
|
|
panel.classList.remove('active')
|
|
})
|
|
} |