Bootstrap progress bar wizard stuck

When you click Continue through the steps, then click Previous on Step 5, then click Continue (on Step 4), the progress bar doesn't move forward. It seems to get stuck. Any idea as to why this is happening?

<div class="tab-pane fade" id="step4">
    <div class="well">
    <a data-step="3" data-toggle="tab" href="#step3" class="btn btn-default pull-left">Previous Step</a>
     <a class="btn btn-default next" href="#">Continue</a>

<div class="tab-pane fade" id="step5">
    <div class="well">
    <a data-step="4" data-toggle="tab" href="#step4" class="btn btn-default pull-left">Previous Step</a>
     <a class="btn btn-success first" href="#">Start over</a>



  var nextId = $(this).parents('.tab-pane').next().attr("id");
  return false;


$('a[data-toggle="tab"]').on('', function (e) {

  //update progress
  var step = $('step');
  var percent = (parseInt(step) / 5) * 100;

  $('.progress-bar').css({width: percent + '%'});
  $('.progress-bar').text("Step " + step + " of 5");

  //e.relatedTarget // previous tab



  $('#myWizard a:first').tab('show')


Answers 1

  • This might be due to having multiple 'a' tags with data-toggle to same containers.

    Make a similar implementation for the previous-button click, then all seems to be good.

    // Previous button click event
    $('.prev').click(function() {
        var prevId = $(this).parents('.tab-pane').prev().attr('id');
        $('a[href=#' + prevId + ']').click();

    Here's your updated fiddle -

Related Articles