I'm using Bootstrap 4 and have created a card with a .card-header and .card-block like so:
<div class=card>
<div class=card-header>
<a data-toggle=collapse href=#test-block aria-expanded=true aria-controls=test-block>
card header
</a>
</div>
<div id=test-block class=card-block>
card block
</div>
</div>
I want to be able to click the card header to toggle the card block. I've tried using Bootstrap's collapse mechanism (you'll notice the data-toggle=collapse
in the card header). It works - but the animation is extremely choppy.
I can't figure out why. Here's an example on codepen.