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

161
Visualizações
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 Respostas
Responde à pergunta

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 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