This is a solution to the Interactive rating component challenge on Frontend Mentor. Frontend Mentor challenges help you improve your coding skills by building realistic projects.
Note: Delete this note and update the table of contents based on what sections you keep.
Users should be able to:
- View the optimal layout for the app depending on their device's screen size
- See hover states for all interactive elements on the page
- Select and submit a number rating
- See the "Thank you" card state after submitting a rating
- Solution URL: [(https://github.com/aszcoding/Interactive-Rating-Component)]
- Live Site URL: [(https://aszcoding.github.io/Interactive-Rating-Component/)]
I styled each card and then worked on the JavaScript portion to get them to display one at a time.
- Semantic HTML5 markup
- Flexbox
- Mobile-first workflow
- JavaScript
Through this project, I learned how to make the background color of buttons stay a certain color once they're clicked. I also learned how to hide one card until a triggering event happens and then having it show up on screen.
submit_btn.addEventListener('click', e =>{ Card2.classList.remove('hide') Card1.classList.add('hide') })
I am going to choose more challenges on Frontend Mentor that include JavaScript so I can get more practice with event listeners and JS in general.
- MDN Web Docs - CSS/:focus - This helped me with understanding how to make my number buttons hold a solid orange background color once clicked.
- LinkedIn - Ashley Serrano-Ziel
- Frontend Mentor - @aszcoding
@Esesosa-max's YouTube video on this challenge really helped me with the JS portion.