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

106
Vistas
JavaScript .click() not changing CSS "display" property

I'm trying to make a navigation bar which on click to make visible a div that has been previously hidden with display: none. Below is what I have till now:

Navigation bar:

$(document).ready(function() {
      $('#home').click(function() {
        $('.site-content').html($('#home_wrap'));
      });

      $('#skills').click(function() {
        $('.site-content').html($('#skills_wrap'));
      });
#home_wrap,
#skills_wrap {
  display: none;
}

.site-content {
  max-width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
<div class="nav__content">
  <ul class="nav__list">
    <li class="nav__list-item" id="home" href="#">Home</li>
    <li class="nav__list-item" id="skills" href="#">Skills</li>
  </ul>
</div>

As this is an old project, I think the navigation used to work but now it's not.

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Try to use: $('#home_wrap').show()

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