Design comparison
Solution retrospective
I'm using html, css and vanilla javascript for this challenge. My current code (of javascript) only allow me to open the faq one at a time, I also want to make the arrow rotate 180deg but It didn't work as I wanted to. I'd be happy if you could give your feedback on my code
Community feedback
- @yadprabPosted almost 4 years ago
Hi iraagyanti, I have tried this but it has issues https://github.com/yadprab/pro-6/blob/main/js/main.js
Try this method if you find a solution notify me
Keep learning
0 - @yadprabPosted almost 4 years ago
hey it is because of hidePaneltext function
if you want toggle to functioning removes this function. for each time it adds and removes it still pressed and show class added to target element if you want this to be functioning with toggle maintain a state and toggle state add classes according to state. or make if statement based on an index and add classes
and for button use inline SVG and make SVG or img element unclickable by pointer-events none to avoid bubbling. make sure button is the target
great job keep coding
0@iraagyantiPosted almost 4 years ago@yadprab Hi, sorry I'm new in using javascript. I've tried to change my code using if else statement but that way makes it not toggle one at a time. Is there any way to make it toggle one at time?
0
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord