I have a website that uses Bootstrap 4. In this website, I'm using cards. Each card has a title. In the right hand side are some icons.
When a user clicks an icon, I want to cover the title with some specific content. I want to animate the content like the language stats bar on GitHub.
At this time, as shown in this Fiddle, I have the following:
<div class="container">
<div class="card">
<div class="card-header">
<div class="row">
<div class="col-9">
Card Title
<div id="headerContent" class="d-none">
This is content I want to animate in from the top.
</div>
</div>
<div class="col-3">
<i class="fa fa-folder-open-o fa-lg float-right" onclick="toggleHeaderContent()"></i>
</div>
</div>
</div>
<div class="card-body">
<h4 class="card-title">Special title treatment</h4>
<p class="card-text">With supporting text below as a natural lead-in to additional content.</p>
<a href="#" class="btn btn-primary">Go somewhere</a>
</div>
</div>
</div>
I don't know how to make the headerContent
animate like the language stats bar on GitHub. How do I do that animation?
Thank you