JSFiddle - React, Tailwind, and code Playground
HTML
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<div class="container">
<div id="myCarousel" class="carousel slide" data-ride="carousel" data-interval="">
<!-- Indicators -->
<ol class="carousel-indicators nav nav-pills nav-justified">
<li data-target="#myCarousel" data-slide-to="0" class="active">
<a data-toggle="pill" class="js-link js-link-0" href="#1">1</a>
</li>
<li data-target="#myCarousel" data-slide-to="1">
<a data-toggle="pill" class="js-link js-link-1" href="#2">2</a>
</li>
<li data-target="#myCarousel" data-slide-to="2">
<a data-toggle="pill" class="js-link js-link-2" href="#3">3</a>
</li>
</ol>
<!-- Wrapper for slides -->
<div class="carousel-inner" role="listbox">
<div class="item active">
<img src="https://placehold.it/50x50">
<img src="https://placehold.it/50x50">
<img src="https://placehold.it/50x50">
<img src="https://placehold.it/50x50">
<div class="carousel-caption">
<h3>Chania</h3>
<p>The atmosphere in Chania has a touch of Florence and Venice.</p>
</div>
</div>
<div class="item">
<img src="https://placehold.it/50x50">
<img src="https://placehold.it/50x50">
</div>
<div class="item">
<img src="https://placehold.it/50x50">
<img src="https://placehold.it/50x50">
<img src="https://placehold.it/50x50">
<div class="carousel-caption">
<h3>Flowers</h3>
<p>Beatiful flowers in Kolymbari, Crete.</p>
</div>
</div>
</div>
</div>
<div class="tab-content">
<div id="1" class="tab-pane fade in active">
<h3>Menu 1</h3>
<p>Some content in...
CSS
.carousel-inner>.item>img {
display: inline-block;
}
.carousel {
margin-top: 40px;
}
.carousel-indicators {
top: -40px;
bottom: 0;
}
.carousel-indicators li {
margin: 0;
border: none;
text-indent: 0;
padding: 0 15px;
width: 0;
height: 0;
}
.carousel-indicators .active {
width: 0;
height: 0;
}
.carousel-indicators li a {
width: 38px;
}
.carousel-control {
width: 0%;
}
.glyphicon {
color: grey;
}
.carousel-control .glyphicon-chevron-left {
margin-left: 10px;
top: 20px;
}
.carousel-control .glyphicon-chevron-right {
margin-right: 10px;
top: 20px;
}
@media screen and (min-width: 768px) {
.carousel-control .glyphicon-chevron-left {
margin-left: 10px;
top: 50%;
}
.carousel-control .glyphicon-chevron-right {
margin-right: 10px;
top: 50%;
}
}
JavaScript
$(document).ready(function() {
var tabs = Array.prototype.slice.call(document.querySelector(".nav").children, 0);
$('.glyphicon').on('click', function(e) {
var event = jQuery.Event('click');
tabs.forEach(function(item) {
if ( $(item).hasClass('active') ) {
var id = parseInt( item.getAttribute('data-slide-to') );
if ( $(e.target).hasClass('glyphicon-chevron-left') ) {
if (id == 0) {
id = tabs.length-1;
} else {
id -= 1;
}
}
if ( $(e.target).hasClass('glyphicon-chevron-right') ) {
if (id == tabs.length-1) {
id = 0;
} else {
id += 1;
}
}
var elem = '.js-link-' + id;
jQuery(elem).trigger(event);
}
});
});
});