How to put back the normal state of a class after clicking for something else Brooklyn ?

HarmanKardon
New Member
18 0 0

Hi ! I want to know how to put back the normal state of a class after clicking for another class (exemple, a FAQ) like '' :focus '' in CSS. From my research on the internet, I guess we have to mix Javascript + CSS + HTML.

 

In my situation, it's about my FAQs. I want the to be able to show a '' :focus '' on the question selected and when you click everywhere on your screen or a new question, I want the effect '' color and background-color '' to be back to normal when selected. 

 

Normal state : Normal.png

 

When you click on the question: new state.png

 

For the FAQs, I'm using these code from that tutorial: https://easycodeguide.com/build-customizable-faqs-page-using-section-shopify.html

 

can I have help please lol ?

 

0 Likes