vandi vandi - 1 year ago 69
CSS Question

First nav pills content didn't show up in Bootstrap

I have pilss that have like 4 tabs.
when I first reload, the first tab didn't show the content, but if I go to other tab and back to the first tab, the content just show up.
How to fix this guys?

<div class="col-lg-3 col-sm-3 col-md-3">
<ul class="nav nav-pills nav-stacked">
<li class="active"><a href="#standar_Spesifikasi" role="tab" data-toggle="tab">Standar Spesifikasi</a></li>
<li><a href="#spesifikasi_Produk" role="tab" data-toggle="tab">Spesifikasi Produk</a></li>
<li><a href="#spesifikasi_material" role="tab" data-toggle="tab">Spesifikasi Material</a></li>
<li><a href="#kapasitas_Produk" role="tab" data-toggle="tab" >Kapasitas Produk</a></li>
<div class="col-lg-8 col-lg-offset-1 col-sm-9 col-md-9">
<div class="tab-content">
<div class="tab-pane" id="standar_Spesifikasi">
<div class="tab-pane" id="spesifikasi_Produk">
<div class="tab-pane" id="spesifikasi_material">
<div class="tab-pane" id="kapasitas_Produk">

$("ul.nav-pills a").click(function (e) {

Answer Source

add active class to first tab

<div class="tab-pane active" id="standar_Spesifikasi">