Currently, I am encountering an issue with implementing a button to expand and collapse a "table of contents" in Bootstrap 4.
The code I have so far can be viewed here: https://codepen.io/nht910/pen/RwwwyKB
Code Snippet:
<div class="main-wrapper col-12">
<div class="post-wrapper">
<div class="post-body d-flex">
<div class="post-content">
<p>...</p>
</div>
<div class="post-toc">
<!-- I utilize Boostrap-TOC for this table of content: https://afeld.github.io/bootstrap-toc-->
<nav class="sticky-top" id="toc"></nav>
</div>
</div>
</div>
</div>
I am seeking assistance to integrate the "table of contents" within a collapsible button and achieve an animation effect upon clicking, similar to the images linked below.
https://i.stack.imgur.com/Zhz96.png
https://i.stack.imgur.com/QcbQt.png
Your help on this matter would be greatly appreciated. Thank you!