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
Make Navbar Active Link Background Color Remains Highlighted

I have code for side bar. I want the background of the link changes when I click it (background color automatically changes when I click either pegawai or absen). But with the javascript code like that, it always loading and the background color can't stay focused. How do I make background color for active bars?

script for the active link

code for link

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

0

It's not that simple because css can't retain the style if it's not initial style.
You need to adjust your jQuery code to check the url of the page also. You can utilize window.location.pathname And check if the current path name match with any link and add the css there.

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