Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

156
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!