Hi there 👋, I’m Orton and this is my solution for this challenge.
Built With:
TailwindCSS npm - prettier React.js, HowlerJS, Framer-Motion, Axios. Any suggestions on how I can improve are welcome!
Thank you. 😊✌️
Hi there 👋, I’m Orton and this is my solution for this challenge.
Built With:
TailwindCSS npm - prettier React.js, HowlerJS, Framer-Motion, Axios. Any suggestions on how I can improve are welcome!
Thank you. 😊✌️
I have completed this challenge. Pls, feedbacks are necessary
I am still struggling with the JavaScript for the accordion. I have managed to close other items, when another accordion item is opened, but I haven't found out how to close the current accordion item, when clicking it directly.
If anyone knows how to close the active menu when clicking on it, please let me know.
Thanks for viewing.
Clear the active CSS you used for JS and add this to your CSS /* Correction / .accordion_answer { max-height:0; overflow: hidden; transition:max-height 1.4s ease; } .active .accordion_answer{ max-height:10rem; } .active .arrow{ transform: rotate(180deg); } .active .accordion_question{ color: #000; } .arrow { transition: 350ms all; } / Correction End*/
Delete your JS code and add this js code to it and it will solve the issue // Solution const answer = document.querySelectorAll(".accordion_element");
answer.forEach(answer =>{ answer.addEventListener("click", ()=>{ answer.classList.toggle("active") }) }); If it solves the issue, hola at me. Happy holidays!🥂🍻