document.min.js 630 B

12345678910111213141516171819202122
  1. $(document).ready(function() {
  2. $('.accordion-item__trigger').click(function(){
  3. $(this).parent('.accordion-item').toggleClass('accordion-item--active');
  4. });
  5. $('.main>div.accordion-item:last-child').click(function(){
  6. const parent = $(this).parent();
  7. if ($('.main>div.accordion-item:last-child').hasClass('accordion-item--active')){
  8. $('.main>div.accordion-item:last-child').css('border-bottom', '1px solid black');
  9. } else {
  10. $('.main>div.accordion-item:last-child').css('border-bottom', '1px solid #E5E5E5');
  11. }
  12. });
  13. });