Day # 68: FAQ boxes
While working on a dropdown menu of a previous project, I figured I could keep practicing by designing FAQ boxes. For today’s project I thought I could have a little bit of fun by answering those questions with some humor.
The key here is to toggle between a regular a box and the one that displays the answer:
toggles.forEach(toggle => {
toggle.addEventListener('click', () => {
toggle.parentNode.classList.toggle('active');
})
})
Then it’s just a matter of styling those boxes to make them appear the way you want them to, which is rather simple by now.
Comments
Post a Comment