Skip to content
  • Unlock Pro
  • Log in with GitHub
Profile
OverviewSolutions
5
Comments
1

Daniel Ramírez

@danyrszzMéxico120 points

I’m a mysterious individual who has yet to fill out my bio. One thing’s for certain: I love writing front-end code!

Latest solutions

  • Advance generator app - vanilla js, sass


    Daniel Ramírez•120
    Submitted over 3 years ago

    0 comments
  • Countdown timer - vanilla js


    Daniel Ramírez•120
    Submitted over 3 years ago

    0 comments
  • Interactive pricing component


    Daniel Ramírez•120
    Submitted over 3 years ago

    0 comments
  • Interactive rating component -vanilla js


    Daniel Ramírez•120
    Submitted over 3 years ago

    0 comments
  • Tip Calculator -vanilla JS


    Daniel Ramírez•120
    Submitted over 3 years ago

    0 comments

Latest comments

  • Jp Lawrence•40
    @jplawrence
    Submitted over 3 years ago

    Rating Component - HTML, CSS and JS

    3
    Daniel Ramírez•120
    @danyrszz
    Posted over 3 years ago

    i have problems with my html semantics but i can help with the JS part:

    you can add the same class to each one of your li elements, then do a querySelectorAll to assign each one of them to an array, then you can do two things: either add an eventlistener to the ul element (container) to manage each one of the li clicks, or add an event listener to each one of li elements, so that when you click you can have the exact clicked element and you'll be able to do something like "event.target.classList.add("selected") where selected will have the desired background color, then to remove the previous selected element you can at each click traverse the array and do something like "event.target.classList.remove("selected") for each li element.

    This way you write the event just once and you can add as many elements as you like without having to touch the js.

    That's kinda the way i did it, hope i made myself clear

    Marked as helpful

Stay up to datewith new challenges, featured solutions, selected articles, and our latest news

Frontend Mentor

  • Unlock Pro
  • Contact us
  • FAQs
  • Become a partner

Explore

  • Learning paths
  • Challenges
  • Solutions
  • Articles

Community

  • Discord
  • Guidelines

For companies

  • Hire developers
  • Train developers
© Frontend Mentor 2019 - 2025
  • Terms
  • Cookie Policy
  • Privacy Policy
  • License

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub