How do I% Bootstrap 4.1% vary between contents when clicked on them, I created navbar
following the example of the site.
For nav
open the items do you need to add action with js in it? How do I?
I tried this way:
$('#nav-home').on('hide.bs.tab', function (e) {
e.target // newly activated tab
e.relatedTarget // previous active tab
});
$('#nav-perfil').on('hide.bs.tab', function (e) {
e.target // newly activated tab
e.relatedTarget // previous active tab
});
Navbars:
<nav>
<div class="nav nav-tabs" id="nav-tab" role="tablist">
<a class="nav-item nav-link active" id="nav-home-tab" data-toggle="tab" href="#nav-home" role="tab" aria-controls="nav-home" aria-selected="true">Home</a>
<a class="nav-item nav-link" id="nav-profile-tab" data-toggle="tab" href="#nav-profile" role="tab" aria-controls="nav-profile" aria-selected="false">Profile</a>
</div>
</nav>
<div class="tab-content" id="nav-tabContent">
<div class="tab-pane fade show active" id="nav-home" role="tabpanel" aria-labelledby="nav-home-tab">...</div>
<div class="tab-pane fade" id="nav-profile" role="tabpanel" aria-labelledby="nav-profile-tab">...</div>
</div>