Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

265
Vistas
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 la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda