As someone new to web development, I am currently working on a web app and struggling with the page design. Specifically, I am attempting to create a fixed side navbar with content displayed in the second column of a split row. Below is the code I have managed to put together so far.
The navigation works fine the first time - if I click on all the buttons sequentially, I see the desired content body. However, I am unable to click on the links a second time to display the relevant content on the side. What am I doing wrong here? Any help would be appreciated!
<div class="row">
<div class="col-2 bg-light py-0 px-1 sticky-top">
<ul class="nav flex-column">
<li class="nav-item text-left">
<a class="nav-link bg-dark list-group-item text-white active" href="#h_view" data-toggle="tab"> Overview</a>
<a class="nav-link bg-dark list-group-item text-white" href="#h_my" data-toggle="collapse">
My History
</a>
<div id="h_my" class="collapse">
<a class="nav-link list-group-item bg-secondary text-white" data-toggle="tab" href="#h_my_run"> Runs</a>
<a class="nav-link list-group-item bg-secondary text-white" data-toggle="tab" href="#h_my_data">Data Update</a>
<a class="nav-link list-group-item bg-secondary text-white" data-toggle="tab" href="#h_my_rules">Rules Mapping</a>
</div>
</li>
</ul>
</div>
<div class="bg-white col-10">
<div class="tab-content pt-2">
<div id="h_view" class="container tab-pane active">
This section is for History Overview
</div>
<div id="h_my_run" class="container tab-pane fade">
This section is for Run History
</div>
<div id="h_my_data" class="container tab-pane fade">
This section is for My Data Upload History
</div>
<div id="h_my_rules" class="container tab-pane fade">
This section is for My Rules changes
</div>
</div>
</div>
</div>
EDIT: It appears the issue lies within the collapse menu. Upon inspecting the element, I noticed that after clicking on sub-items (Runs, Data Update, Rule Mapping), their class remains active permanently, regardless of where I click next.