Pricing Component with HTML, CSS and JAVASCRIPT for toggle
Design comparison
Solution retrospective
Hello guys.
I didn't know how to toggle the prices. I have tried to search for a response but I didn't catch it. Please feel free to give me a response here. Watch the code and tell me what happened? THANKS!
Community feedback
- @SsaavaPosted about 1 year ago
🚀 Toggling Prices - Quick Tip
Hey there, Frontend Mentor buddy!
I checked out your source code – it looks awesome, especially the neat use of CSS nesting properties! 🎉
Now, let's talk about toggling prices. You can level up your JavaScript game by exploring the
forEach()
loop andquerySelectorAll()
method:These resources will help you achieve the results you're aiming for! 🚀
By the way, I've forked your repo and plan to make a pull request soon. Hope you're cool with it! 🙌 Keep rocking, and thanks for completing the challenge!
P.S. Feel free to give me any feedback or questions you have.
1@codeguy9Posted about 1 year ago@Ssaava hello. Thank you for your response to my repo. I have seen the changes and I quite understand them. Just one question though:
Why use
forEach
because price1 was just only one. And price2 was the same....Thank you again and hope to colaborate more soon.
EDIT: I have been looking on the code and now I understand it.
1
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