I'm currently facing an issue with Bootstrap's tab component. I need help figuring out how to hide a lorem ipsum section and show a hidden div when a specific tab is clicked, and then revert the changes when a different tab is selected.
$(function(){
$('.nav-tabs a').on('click', function (e) {
e.preventDefault();
$(this).tab('show');
});
});
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap-theme.min.css" rel="stylesheet"/>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css" rel="stylesheet"/>
<ul class="nav nav-pills">
<li class="active"><a href="#one" data-toggle="tab">One</a></li>
<li><a href="#two" data-toggle="tab">Two</a></li>
<li><a href="#three" data-toggle="tab">Three</a></li>
</ul>
<div class="tab-content clearfix">
<div class="tab-pane active" id="one">
<p>One</p>
</div>
<div class="tab-pane" id="two">
<p>Two</p>
</div>
<div class="tab-pane" id="three">
<p>Clicking on this tab should hide the Lorem Ipsum and display content</p>
</div>
</div>
<div class="col-md-12">
<div>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas auctor placerat ex a posuere. Integer feugiat, orci ac vestibulum rhoncus, arcu tellus volutpat ante, in accumsan diam nisl vitae tellus. In at eros sit amet quam luctus auctor. Donec a gravida nisl, nec aliquam lectus. Sed mattis bibendum elementum. Nullam cursus scelerisque arcu, a eleifend sapien posuere nec. Nunc ut fringilla erat. Aenean egestas felis tortor, vel bibendum ligula elementum nec. Etiam ultricies blandit arcu vel cursus. Vestibulum at felis libero. Nulla nec lectus purus. Aliquam tempor rutrum sagittis.</p>
</div>
</div>
<div class="col-md-12">
<div class="hidden">
<!-- Clicking on the third tab hides the Lorem Ipsum and shows this div, selecting another tab hides this again and displays Lorem Ipsum -->
<p>Content</p>
</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
Here is a JSFiddle http://jsfiddle.net/zacnespral21/fkv5tvaz/
Thank you for your assistance!