Solution to second FEM challenge. Challenge link: (https://www.frontendmentor.io/challenges/faq-accordion-wyfFdeBwBz)
- The idea was to create an Accordion menu with 4 questions, each revealing its hidden answer upon being clicked.
Users should be able to:
- Hide/Show the answer to a question when the question is clicked (done)
- Navigate the questions and hide/show answers using keyboard navigation alone (to-do)
- View the optimal layout for the interface depending on their device's screen size (to-do)
- See hover and focus states for all interactive elements on the page (done)
- Live Site URL: [https://dian-new-dev.github.io/FEM-Challenge-2-FAQ-Accordion/]
- HTML
- CSS
- CSS Grid
- Javascript
- Modular JS functions: for the first time, I didn't wrote one single giant Eventlistener containing every single function. It makes it much easier to manage the code.
- Learned how to use classList.toggle(), though I ended up creating two functions to add and remove classes for better interactivity.
- This challenge isn't done. I still have to add: 1) keyboard navigation 2) responsive layout. Soon.
- Website - don't have yet
- Frontend Mentor - @dian-New-Dev
- Twitter - don't have