Speed up the Toggle Down Button Using jquery

by Vijay Pancholi

HTML

<div class="toggle_btn">Skul detailjer</div>
<section class="toggle_content hide_content">
  <table>
    <tr>
      <td>Pristype</td>
      <td>Variable</td>
    </tr>
    </table>
</section>

<script src="//code.jquery.com/jquery-3.7.1.js"></script>

CSS

.toggle_btn:before           { content: "\25bc"; }
.toggle_btn.active:before { content: "\25b2"; }

/* Helpers */
.hide_content { display: none; }

JavaScript

jQuery(function($) { // DOM ready and $ alias in scope

  $(".toggle_btn").on('click', function() {
    $(this).toggleClass('active').next(".toggle_content").stop().slideToggle(100);
    // Specifies the speed of the slide effect. Default value is 400 milliseconds
  });

});