"Tabbed Slider Carousel (inspired by sevenx.de)"
Bootstrap 3.1.0 Snippet by alexhochart

<link href="//netdna.bootstrapcdn.com/bootstrap/3.1.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//netdna.bootstrapcdn.com/bootstrap/3.1.0/js/bootstrap.min.js"></script> <script src="//code.jquery.com/jquery-1.11.1.min.js"></script> <!------ Include the above in your HEAD tag ----------> <div class="container-fluid"> <div id="custom_carousel" class="carousel slide" data-ride="carousel" data-interval="2500"> <!-- Wrapper for slides --> <div class="carousel-inner"> <div class="item active"> <div class="container-fluid"> <div class="row"> <div class="col-md-3"><img src="http://placehold.it/350x250" class="img-responsive"></div> <div class="col-md-9"> <h2>Slide 1</h2> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Animi, labore, magni illum nemo ipsum quod voluptates ab natus nulla possimus incidunt aut neque quaerat mollitia perspiciatis assumenda asperiores consequatur soluta.</p><p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Animi, labore, magni illum nemo ipsum quod voluptates ab natus nulla possimus incidunt aut neque quaerat mollitia perspiciatis assumenda asperiores consequatur soluta.</p> </div> </div> </div> </div> <div class="item"> <div class="container-fluid"> <div class="row"> <div class="col-md-3"><img src="http://placehold.it/350x250" class="img-responsive"></div> <div class="col-md-9"> <h2>Slide 2</h2> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Animi, labore, magni illum nemo ipsum quod voluptates ab natus nulla possimus incidunt aut neque quaerat mollitia perspiciatis assumenda asperiores consequatur soluta.</p><p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Animi, labore, magni illum nemo ipsum quod voluptates ab natus nulla possimus incidunt aut neque quaerat mollitia perspiciatis assumenda asperiores consequatur soluta.</p> </div> </div> </div> </div> <div class="item"> <div class="container-fluid"> <div class="row"> <div class="col-md-3"><img src="http://placehold.it/350x250" class="img-responsive"></div> <div class="col-md-9"> <h2>Slide 4</h2> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Animi, labore, magni illum nemo ipsum quod voluptates ab natus nulla possimus incidunt aut neque quaerat mollitia perspiciatis assumenda asperiores consequatur soluta.</p><p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Animi, labore, magni illum nemo ipsum quod voluptates ab natus nulla possimus incidunt aut neque quaerat mollitia perspiciatis assumenda asperiores consequatur soluta.</p> </div> </div> </div> </div> <div class="item"> <div class="container-fluid"> <div class="row"> <div class="col-md-3"><img src="http://placehold.it/350x250" class="img-responsive"></div> <div class="col-md-9"> <h2>Slide 3</h2> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Animi, labore, magni illum nemo ipsum quod voluptates ab natus nulla possimus incidunt aut neque quaerat mollitia perspiciatis assumenda asperiores consequatur soluta.</p><p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Animi, labore, magni illum nemo ipsum quod voluptates ab natus nulla possimus incidunt aut neque quaerat mollitia perspiciatis assumenda asperiores consequatur soluta.</p> </div> </div> </div> </div> <!-- End Item --> </div> <!-- End Carousel Inner --> <div class="controls"> <ul class="nav"> <li data-target="#custom_carousel" data-slide-to="0" class="active"><a href="#"><img src="http://placehold.it/50x50"><small>Slide One</small></a></li> <li data-target="#custom_carousel" data-slide-to="1"><a href="#"><img src="http://placehold.it/50x50"><small>Slide Two</small></a></li> <li data-target="#custom_carousel" data-slide-to="2"><a href="#"><img src="http://placehold.it/50x50"><small>Slide Three</small></a></li> <li data-target="#custom_carousel" data-slide-to="3"><a href="#"><img src="http://placehold.it/50x50"><small>Slide Four</small></a></li> </ul> </div> </div> <!-- End Carousel --> </div>
body { padding-top:20px } #custom_carousel .item { color:#000; background-color:#eee; padding:20px 0; } #custom_carousel .controls{ overflow-x: auto; overflow-y: hidden; padding:0; margin:0; white-space: nowrap; text-align: center; position: relative; background:#ddd } #custom_carousel .controls li { display: table-cell; width: 1%; max-width:90px } #custom_carousel .controls li.active { background-color:#eee; border-top:3px solid orange; } #custom_carousel .controls a small { overflow:hidden; display:block; font-size:10px; margin-top:5px; font-weight:bold }
$(document).ready(function(ev){ $('#custom_carousel').on('slide.bs.carousel', function (evt) { $('#custom_carousel .controls li.active').removeClass('active'); $('#custom_carousel .controls li:eq('+$(evt.relatedTarget).index()+')').addClass('active'); }) });

Related: See More


Questions / Comments:

i am using same code but i am getting "Uncaught ReferenceError: $ is not defined" could you help me please

maruthibabul () - 8 months ago - Reply 0


You need to include jquery and bootstrap in your code

bidnapper (0) - 8 months ago - Reply 0