title: How can I disable the animation for a Bootstrap 4 collapse collapsing / showing with JQuery?
body: <p>I have a big Bootstrap 4 collapsable element. I want it to be able to collapse / show manually like normal.</p>
  <p>But I also want it to collapse when a condition is met, so I use this function:</p>
  <pre><code>if (condition) {
    $('#myCollapse').collapse();
  }
  </code></pre>
  <p>It works fine, but every time I change pages it collapses with the animation that takes a while. I want to remove this animation so it just instantly collapse.</p>
  <p>I tried:</p>
  <ul>
  <li>Hiding it. Doesn't work as I need to trigger the state change from &quot;shown&quot; to &quot;collapsed&quot; for other purposes and hiding it doesn't trigger that.</li>
  <li>Using $.support.transition = false; but it doesn't seem to work and it says it's deprecated.</li>
  </ul>
  <p>Any ideas? Thanks.</p>