Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

interactive-rating-component

@Stack-Mm

Desktop design screenshot for the Interactive rating component coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


I have problems with the DOM

Community feedback

Elijah 320

@taco-neko

Posted

Can you elaborate what you mean by having problems with the DOM?

I've noticed you haven't written an onclick event for the buttons, and also, you're not adding the event listener correctly. You've written

let boton = document.getElementsByClassName("botonC")
boton = document.addEventListener('click', function() {
    
})

but you should write

const boton = document.getElementsByClassName("botonC")
boton.forEach( (item) => {
    item.addEventListener( 'click', (event) => {
        // your function here
    })
})
0
P
Luciano Lima 1,290

@LucianoDLima

Posted

Hey, I've noticed the buttons are not working, and you said you're having problems with the DOM, mind elaborating where you're struggling?

Also good job on the challenge, you're very close to finishing it!

0

Please log in to post a comment

Log in with GitHub
Discord logo

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