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

157
Vistas
Adding arrow at accordion

I was working on an accordion that when one of the tabs opens the other ones close. I wanted to add arrows on the side so that the arrows move when the accordion opens. So when it is closed is in this position Closed position and when it is opened is in this position open position arrow . I also wanted to add a fade transition to the information that is shown after you click one accordion. Below you can find the HTML file and JS file of what i worked so far. I opened to suggestions if you have any other idea to make this better.

<dl class="accordion">
    
    <dt class="acc-d"><a href="">DESCRIPTION</a></dt>
    <dd class="acc">some text here</dd>
    
    <dt class="acc-d"><a href="">SHIPPING & RETURN</a></dt>
    <dd class="acc"> Some text here</dd>
    
    <dt class="acc-d"><a href="">REVIEWS</a></dt>
    <dd class="acc">Some text here</dd>
    
    </dl>

(function($) {
    
  var allPanels = $('.accordion > dd').hide();
    
  $('.accordion > dt > a').click(function() {
    allPanels.slideUp();
    $(this).parent().next().slideDown();
    return false;
    
  });

  
})(jQuery);
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

You can make the chevrons to rotate 90 deg, like this:

.chevron-rotate {
  -moz-transition: all 0.2s linear;
  -webkit-transition: all 0.2s linear;
  transition: all 0.2s linear;
}

.chevron-rotate.down {
  -moz-transform: rotate(90deg);
  -webkit-transform: rotate(90deg);
  transform: rotate(90deg);
}

See codepen.

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