"Step Wizard"
Bootstrap 3.0.0 Snippet by niksgupt

<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <!------ Include the above in your HEAD tag ----------> <div class="container"> <div class="row form-group"> <div class="col-xs-12"> <ul class="nav nav-pills nav-justified setup-panel thumbnail"> <li class="active"><a href="#step-1"> <h4 class="list-group-item-heading">Step 1</h4> <p class="list-group-item-text">First step description</p> </a></li> <li class="disabled"><a href="#step-2"> <h4 class="list-group-item-heading">Step 2</h4> <p class="list-group-item-text">Second step description</p> </a></li> <li class="disabled"><a href="#step-3"> <h4 class="list-group-item-heading">Step 3</h4> <p class="list-group-item-text">Third step description</p> </a></li> <li class="disabled"><a href="#step-4"> <h4 class="list-group-item-heading">Step 4</h4> <p class="list-group-item-text">Fourth step description</p> </a></li> <li class="disabled"><a href="#step-5"> <h4 class="list-group-item-heading">Step 5</h4> <p class="list-group-item-text">Fifth step description</p> </a></li> </ul> </div> </div> <div class="row"> <div class="col-xs-12"> <div class="col-md-12 well setup-content text-center" id="step-1"> <h1 class="text-center"> STEP 1</h1> </div> </div> </div> <div class="row"> <div class="col-xs-12"> <div class="col-md-12 well setup-content" id="step-2"> <h1 class="text-center"> STEP 2</h1> </div> </div> </div> <div class="row"> <div class="col-xs-12"> <div class="col-md-12 well setup-content" id="step-3"> <h1 class="text-center"> STEP 3</h1> </div> </div> </div> <div class="row"> <div class="col-xs-12"> <div class="col-md-12 well setup-content" id="step-4"> <h1 class="text-center"> STEP 4</h1> </div> </div> </div> <div class="row"> <button id="prev" class="btn btn-primary btn-lg">Previous</button> <button id="next" class="btn btn-primary btn-lg">Next</button> </div> </div>
body{ margin-top:20px; }
$(document).ready(function() { var navListItems = $('ul.setup-panel li a'), allWells = $('.setup-content'); allWells.hide(); $('#prev').addClass('disabled'); navListItems.click(function(e) { e.preventDefault(); var $target = $($(this).attr('href')), $item = $(this).closest('li'); if (!$item.hasClass('disabled')) { navListItems.closest('li').removeClass('active'); $item.addClass('active'); allWells.hide(); $target.show(); } }); $('ul.setup-panel li.active a').trigger('click'); // DEMO ONLY // $('#next').on('click', function(e) { $('ul.setup-panel > li[class="active"]').next().removeClass('disabled'); $('ul.setup-panel li[class="active"]').removeClass('active').next().addClass('active'); $('ul.setup-panel li[class="active"]').find('a').trigger('click'); //$(this).remove(); $('#prev').removeClass('disabled'); }); $('#prev').on('click', function(e) { $('ul.setup-panel > li[class="active"]').prev().removeClass('disabled'); $('ul.setup-panel li[class="active"]').removeClass('active').prev().addClass('active'); $('ul.setup-panel li[class="active"]').find('a').trigger('click'); //$(this).remove(); }) });

Related: See More


Questions / Comments: