Currently, I am incorporating Bootstrap into my project and I am attempting to include a Twitter Bootstrap tab. I have already added jQuery and bootstrap-tabs.js to my project.
Below is the script that I have added:
<script>
$('#myTab a').click(function (e) {
e.preventDefault();
$(this).tab('show');
});
</script>
Furthermore, I am utilizing the following code to add the tabs:
<div class="span12" id="stafftabs" style="margin-bottom: 20px;display:none;">
<ul id="myTab" class="nav nav-tabs">
<li class="active">
<a href="#home" data-toggle="tab">Home</a>
</li>
<li>
<a href="#profile" data-toggle="tab">Profile</a>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown <b class="caret"></b></a>
<ul class="dropdown-menu">
<li>
<a href="#dropdown1" data-toggle="tab">@fat</a>
</li>
<li>
<a href="#dropdown2" data-toggle="tab">@mdo</a>
</li>
</ul>
</li>
</ul>
<div id="myTabContent" class="tab-content">
<div class="tab-pane fade in active" id="home">
<p>Raw</p>
</div>
<div class="tab-pane fade" id="profile">
<p>Food</p>
</div>
<div class="tab-pane fade" id="dropdown1">
<p>Etsy</p>
</div>
<div class="tab-pane fade" id="dropdown2">
<p>Trust</p>
</div>
</div>
</div>
</div>
Although I have successfully set up the tabs, I am encountering an issue where no data is displayed within the tabs.
Any help or guidance on how to resolve this issue would be highly appreciated. Thank you in advance!