"menubar my design"
Bootstrap 3.0.3 Snippet by xrozix

<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//netdna.bootstrapcdn.com/bootstrap/3.0.3/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"> <!-- End Carousel --> <!-- End Carousel Inner --> <ul class="nav nav-pills nav-justified"> <li data-target="#myCarousel" data-slide-to="0" class="active"><a href="#">Home</a></li> <li data-target="#myCarousel" data-slide-to="1"><a href="#">About Us</a></li> <li data-target="#myCarousel" data-slide-to="2"><a href="#">Products</a></li> <li data-target="#myCarousel" data-slide-to="3"><a href="#">Services</a></li> <li data-target="#myCarousel" data-slide-to="4"><a href="#">Contact Us</a></li> </ul> </div> <div id="myCarousel" class="carousel slide" data-ride="carousel"> <!-- Wrapper for slides --> <div class="carousel-inner"> <div class="item active"> <div class="item1"></div> <div class="carousel-caption"> <h3> Headline</h3> <p> Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. Lorem ipsum dolor sit amet, consetetur sadipscing elitr.</p> </div> </div> <!-- End Item --> <div class="item"> <div class="item2"></div> </div> <!-- End Item --> <div class="item"> <div class="item3"></div> </div> <!-- End Item --> <div class="item"> <div class="item4"></div> </div> <!-- End Item --> <div class="item"> <div class="item5"></div> </div> <!-- End Item --> </div> </div>
body { padding-top: 20px; } #myCarousel .nav a small { display: block; } #myCarousel .nav { background: #eee; left: 150px; } .nav-justified > li > a { border-radius: 1px; } .nav-pills>li[data-slide-to="0"].active a { background-color: #00822E; } .nav-pills>li[data-slide-to="1"].active a { background-color: #00822E; } .nav-pills>li[data-slide-to="2"].active a { background-color: #00822E; } .nav-pills>li[data-slide-to="3"].active a { background-color: #00822E; } .nav-pills>li[data-slide-to="3"].active a { background-color: #00822E; } .item1 { background:#FE8600; height:6px; left: 150px; } .item2 { background:#3B5997; height:6px; } .item3 { background:#78B700; height:6px; } .item4 { background:#EA4823; height:6px; } .item5 { background:#00ABED; height:6px; }
$(document).ready( function() { $('#myCarousel').carousel({ interval: 40000; }); var clickEvent = false; $('#myCarousel').on('click', '.nav a', function() { clickEvent = true; $('.nav li').removeClass('active'); $(this).parent().addClass('active'); }).on('slid.bs.carousel', function(e) { if(!clickEvent) { var count = $('.nav').children().length -1; var current = $('.nav li.active'); current.removeClass('active').next().addClass('active'); var id = parseInt(current.data('slide-to')); if(count == id) { $('.nav li').first().addClass('active'); } } clickEvent = false; }); });

Related: See More


Questions / Comments: