Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

266
Visualizações
How do you implement an active state within a parent active state?

I am creating a vertical list of navigation topics (buttons) that will drop down when clicked on and reveal subtopics. When I click on the main topic, I want the color of the button to indicate the button is active, however, I also want an isActive indicator for the subtopics if they're clicked on as well. Here's an example of a similar design I would like. enter image description here

Long story short: I want the main topic to remain active while I'm clicking throughout the subtopics, but I want those subtopics to change color (indicate they're active) independently of the main topic. How can this be achieved? I am somewhat new to JS and these active states, so any help is appreciated!

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda