Я хочу добавить стрелки вверх и вниз в аккордеоне на правой стороне - PullRequest
0 голосов
/ 15 апреля 2020

Я использую код ниже для аккордеона и хочу добавить стрелку вверх / вниз справа от аккордеона. Кто-нибудь может подсказать, как мне добавить стрелки вверх и вниз на правой стороне?

<div class="section">
          <div class="section-title">
            Section 1
          </div>
          <div class="section-content">
            Section 1 Content: Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet.
          </div>
    </div>

    <div class="section">
          <div class="section-title">
            Section 2
          </div>
          <div class="section-content">
            test
          </div>
    </div>

{CSS}

  margin-top: 30px;
}

.section-title {
    background-color: black;
    cursor: pointer;
    color: white;
    padding: 15px;
    font-size: 20px;
}

.section-content {
    padding: 20px;
}

{ JS }

    $(".section-title").click(function() {
          $(this).parent().find(".section-content").slideToggle();
        });

...