I'm using a Bootstrap nav-tab to show and hide different tab-panes based on the screen size thanks to Bootstrap breakpoints.
The issue I'm encountering is when a user is on a small screen with the #hide-show tab-pane active, and then resizes the browser window to a large screen where #hide-show is hidden, the #hide-show pane remains active in the background.
Is there a way to switch the active pane based on the screen size or the display-type attribute of the #hide-show tab pane?
<ul class="nav nav-tabs" id="myTab" role="tablist">
<li class="nav-item">
<a class="nav-link active" id="home-tab" data-toggle="tab" href="#home" role="tab" aria-controls="home" aria-selected="true">Home</a>
</li>
<li class="nav-item d-lg-none">
<a class="nav-link" id="hide-show-tab" data-toggle="tab" href="#hide-show" role="tab" aria-controls="contact" aria-selected="false">Contact</a>
</li>
</ul>
<div class="tab-content" id="myTabContent">
<div class="tab-pane fade show active" id="home" role="tabpanel" aria-labelledby="home-tab">...</div>
<div class="d-block d-lg-none tab-pane fade" id="hide-show" role="tabpanel" aria-labelledby="hide-show-tab">...</div>
</div>