Skip to content

Commit

Permalink
added movement to the pictures
Browse files Browse the repository at this point in the history
  • Loading branch information
abdikarimmacsali committed Jul 11, 2024
1 parent bebea35 commit 24a8a22
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
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')
})
}

0 comments on commit 24a8a22

Please sign in to comment.