-2
rated 0 times
[
3]
[
5]
/ answers: 1 / hits: 5903
/ 4 Years ago, sun, february 16, 2020, 12:00:00
i have a button that will show a bootstrap modal when clicks on it
the modal contains sidebar tabs.
my problem is when i close the modal and open it again by clicking on the button it will open with the last activated tab
i want the activated tab to be the first tab once i close the modal and open the modal again without reloading the page.
my html
// the button that will open the bootstrap modal
<div>
<a href=# class=popupLink data-toggle=modal data-target=#yDetailsModal>
</a>
</div>
// bootstrap modal
<div class=modal id=MyDetailsModal tabindex=-1 role=dialog arialabelledby=myDetailsModal aria-hidden=true >
<div class=modal-dialog modal-details role=document>
<div class=modal-content modal-details>
<div class=modal-header>
<button type=button class=close close-button data-dismiss=modal aria-label=Close id=btnId> </button>
</div>
<div class=modal-body>
<div class= tabs-left id= modal-tabs>
<ul class=nav nav-tabs>
<li class=active>
<a href=#personal data-toggle=tab></a></li>
<li>
<a href=#promotion data-toggle=tab> </a> </li>
<li>
<a href=#vacation data-toggle=tab> </a> </li>
</ul>
</div>
<div class=tab-content id=tab-content>
<div class=tab-pane active id=personalInformation>
<div>
<ul>
<li>
<span> this is a personal information</span>
</li>
</ul>
</div>
</div>
More From » jquery