r/javaScriptStudyGroup • • Sep 10 '19

Looking for help on tweaking a Codepen

Hi, just checked the rules but please let me know if this shouldn't be on here!

There's this accordion codepen https://codepen.io/kathykato/pen/MoZJom and I'm trying to make it so that clicking on one option collapses the others - effectively so there's only ONE expanded at any given time.

There's a comment on the codepen that briefly talks about how to do it but I can't figure out how to use it.

Can anyone help me please?

2 Upvotes

4 comments sorted by

1

u/Volv Sep 10 '19

This would do it.

1

u/june-m Sep 10 '19

Thanks for checking this out! But when I click on that URL it's the same as original and clicking on the accordion items expand them without collapsing previous

1

u/Volv Sep 10 '19

Ha. I thought I fixed that fast enough. Try again

1

u/june-m Sep 10 '19

Legend!!! It works, thank you so so so so much!!! Thank you