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

324
Visualizações
How to improve toggle menu with CSS and JavaScript?

I have implemented a functional menu of chapters(left) and Units(right) that works as i want and seen on the image i have attached. The problem is that it is slow, as i generate the CSS and JavaScript dynamically, so as to define the right ids for each element.

enter image description here

enter image description here

enter image description here

enter image description here

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

You should get your data from the Database all at once:

What about doing this:

SELECT menuChapters.id, menuUnits.id
FROM menuChapters INNER JOIN menuUnits
ON (menuChapters.id = menuUnits.chapter_id)
WHERE menuChapters.class=$get_class AND menuChapters.course=$get_course AND menuChapters.visibility=1
ORDER BY menuChapters.chapterOrder ASC, menuUnits.unitsOrder ASC

This should give you a list where you have the id of your chapter and the id of your unit for each row.

I didn't try the code, so it might have some issues.

about 4 years ago · Juan Pablo Isaza Relatório
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