using JavaScript to toggle share button on/off

Solution retrospective
I had challenges around toggling between hidden and show, I found that I placed my hidden class above my visible class causing this issue.
Another issue I found is that i used getElementByClassName and this ended up returning a variable value being null, this created a bug where my event function would not be called. I fixed this through google search and found that using query selector was a working solution.
Please log in to post a comment
Log in with GitHubCommunity feedback
- @Squ1nty
Regarding your issue, next time try using getElementById, where it helps to use unique id names.
I also just noticed that your mobile-design could use some work. When beginning, try a mobile-first approach. This can help you slowly "grow" your design for larger screen sizes. Another tip when starting out would be to imagine the design provided as a series of flex boxes and grids, from there you can arrange your HTML and CSS accordingly.
All that aside, LGTM! Happy coding!
Marked as helpful
Join 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