diff --git a/_project_starter_/expanding_cards/script.js b/_project_starter_/expanding_cards/script.js index 8b13789..30f929e 100644 --- a/_project_starter_/expanding_cards/script.js +++ b/_project_starter_/expanding_cards/script.js @@ -1 +1,15 @@ +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"); + }) +} \ No newline at end of file diff --git a/_project_starter_/expanding_cards/style_copy0.css b/_project_starter_/expanding_cards/style_copy0.css deleted file mode 100644 index ec80c4b..0000000 --- a/_project_starter_/expanding_cards/style_copy0.css +++ /dev/null @@ -1,16 +0,0 @@ -@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap'); - -* { - box-sizing: border-box; -} - -body { - font-family: 'Roboto', sans-serif; - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; - height: 100vh; - overflow: hidden; - margin: 0; -}