@martinianol
Submitted
I know, I need to start using React... Promise will do it in next project :-)
@ryuzaki979
@martinianol
Submitted
I know, I need to start using React... Promise will do it in next project :-)
@ryuzaki979
Posted
Great Job
Marked as helpful
@marcosfsousa
Submitted
I wanted to start practicing with JSON and the Fetch API and with this challenge I got just what I wished for.
What seemed another head scratcher at first with heaps of lines of JS code resulted in a quite simple few lines with a forEach()
function. Nonetheless, I've seen here much more elegant solutions for this challenge.
There is room for improvement as always!
I appreciate your time to look at my code, critique and help in any way possible.
Obrigado.
@ryuzaki979
Posted
You did great. Here is my solution for this challenge https://www.frontendmentor.io/solutions/time-tracking-dashboard-h4WS8J_gO
have a look.
@alynaug
Submitted
This is my first solution using JavaScript. It was very challenging for me. Any feedback would be great! I added a little animation just for fun XD
@ryuzaki979
Posted
you can show one and hide except the active links easily like this. const faqs = document.querySelectorAll('.accordion__faq') faqs.forEach(faq=>{ faq.addEventListener('click',()=>{ faq.classList.toggle('active') faqs.forEach(item=>{ if(faq!= item){ item.classList.remove('active') } }) }) })
I also did this projects. Here is my solution: https://www.frontendmentor.io/solutions/faqaccordioncard-oaerihiiF
Marked as helpful