"Step Wizard (Working)"
Bootstrap 3.0.0 Snippet by hamik112

<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="//code.jquery.com/jquery-1.11.1.min.js"></script> <!------ Include the above in your HEAD tag ----------> <div class="container"> <div class="row form-group"> <div class="col-xs-4"> <h5><span class="glyphicon glyphicon-shopping-cart"></span> Step 1: Shipping</h5> </div> <div class="col-xs-4"> <h5><span class="glyphicon glyphicon-shopping-cart"></span> Step 2: Payment </h5> </div> <div class="col-xs-4"> <h5><span class="glyphicon glyphicon-shopping-cart"></span> Step 3: Finished</h5> </div> </div> </div> <div class="row setup-content" id="step-1"> <div class="col-xs-12"> <div class="col-md-12 well"> <div class="row"> <div class="col-xs-3 col-sm-4"> <img class="img-responsive hidden-xs" src= "http://dermasnail.com/images/30-day-supply.jpg" /> <img class="img-responsive visible-xs" src= "http://dermasnail.com/images/90-days-supply.jpg" /> </div> <div class="col-xs-9 col-sm-6"> <h4 class="product-name"><strong>DermaSnail</strong></h4><h4><small>Start looking and feeling visibly younger with a 30-day supply of Dermasnail Advanced Anti-Aging Serum. Dermasnail is backed by a 100% Money Back Guarantee.</small></h4> </div> <button id="activate-step-2" class="btn btn-primary btn-lg">Activate Step 2</button> </div> </div> </div> <div class="row setup-content" id="step-2"> <div class="col-xs-12"> <div class="col-md-12 well"> <h1 class="text-center"> STEP 2</h1> </div> </div> </div> <div class="row setup-content" id="step-3"> <div class="col-xs-12"> <div class="col-md-12 well"> <h1 class="text-center"> STEP 3</h1> </div> </div> </div> </div>
body{ margin-top:20px; }
$(document).ready(function() { var navListItems = $('ul.setup-panel li a'), allWells = $('.setup-content'); allWells.hide(); 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 // $('#activate-step-2').on('click', function(e) { $('ul.setup-panel li:eq(1)').removeClass('disabled'); $('ul.setup-panel li a[href="#step-2"]').trigger('click'); $(this).remove(); }) });

Related: See More


Questions / Comments: