title: Stop click action on this
body: <p>I'm doing a simple FAQ's accordion using jQuery and i'm trying to disable the extra click on <code>this</code> because when <code>this</code> is clicked it will just slide up again as it's the one being clicked again.</p>
  
  <p>How can I disable the click or disable the action where it slides back up and down again once the button (the one being clicked) has been clicked?</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>(function($) {
    $('.c-accordion__panel').hide();
    $('.c-accordion__heading').click(function() {
      $('.c-accordion__panel').slideUp('fast'); //slide up panel
      $(this).parent('div').children('.c-accordion__panel').slideDown('fast'); //slide down panel
    });
  })(jQuery);</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;section id="faqs" class="clearfix pb3"&gt;
    &lt;div class="col-12"&gt;
      &lt;h3 class="pb3"&gt;Colocation FAQ&lt;/h3&gt;
      &lt;div class="c-accordion"&gt;
        &lt;div class="c-accordion__heading flex justify-between border"&gt;
          &lt;h4&gt;heading 1&lt;/h4&gt;
          &lt;i class="fas fa-chevron-right"&gt;&lt;/i&gt;
        &lt;/div&gt;
        &lt;div class="c-accordion__panel active"&gt;
          &lt;p&gt;this one has active Mumblecore biodiesel semiotics vice, sustainable banh mi ennui irony vape waistcoat drinking vinegar banjo scenester put a bird on it kickstarter. Dreamcatcher forage tousled gluten-free, taiyaki 3 wolf moon truffaut. Next
            level vinyl kinfolk, beard fanny pack biodiesel pinterest cold-pressed tumeric venmo franzen affogato disrupt wolf 90's. &lt;/p&gt;
        &lt;/div&gt;
      &lt;/div&gt;
      &lt;div class="c-accordion"&gt;
        &lt;div class="c-accordion__heading flex justify-between border"&gt;
          &lt;h4&gt;heading2&lt;/h4&gt;
          &lt;i class="fas fa-chevron-right"&gt;&lt;/i&gt;
        &lt;/div&gt;
        &lt;div class="c-accordion__panel"&gt;
          &lt;p&gt;Mumblecore biodiesel semiotics vice, sustainable banh mi ennui irony vape waistcoat drinking vinegar banjo scenester put a bird on it kickstarter. Dreamcatcher forage tousled gluten-free, taiyaki 3 wolf moon truffaut. Next level vinyl kinfolk,
            beard fanny pack biodiesel pinterest cold-pressed tumeric venmo franzen affogato disrupt wolf 90's. &lt;/p&gt;
        &lt;/div&gt;
      &lt;/div&gt;
      &lt;div class="c-accordion"&gt;
        &lt;div class="c-accordion__heading flex justify-between border"&gt;
          &lt;h4&gt;heading3&lt;/h4&gt;
          &lt;i class="fas fa-chevron-right"&gt;&lt;/i&gt;
        &lt;/div&gt;
        &lt;div class="c-accordion__panel"&gt;
          &lt;p&gt;Mumblecore biodiesel semiotics vice, sustainable banh mi ennui irony vape waistcoat drinking vinegar banjo scenester put a bird on it kickstarter. Dreamcatcher forage tousled gluten-free, taiyaki 3 wolf moon truffaut. Next level vinyl kinfolk,
            beard fanny pack biodiesel pinterest cold-pressed tumeric venmo franzen affogato disrupt wolf 90's. &lt;/p&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/section&gt;</code></pre>
  </div>
  </div>
  </p>