Design comparison
SolutionDesign
Solution retrospective
I had never really used JavaScript, so it was great to practice a little, specifically jQuery! What I had trouble with though was getting the active button to toggle after selecting it again.
I had tried to use .toggleClass() by itself and then using .toggleClass('active', !$(this).hasClass('active')), but alas I couldn't get it to work. Any suggestions about this and general feedback would be greatly appreciated. :)
Community feedback
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