8

I'm not seeing any documentation for this.

How do you manually select which panel is active in the wizard component?

I know it's in there somewhere because you can click on one of the tabs once it's been passed, and navigate back to a previous tab.

Carol Skelly
  • 351,302
  • 90
  • 710
  • 624
Gabriel Alack
  • 472
  • 2
  • 6
  • 16

7 Answers7

9

Yes, you can change wizard step:

$('#MyWizard').wizard('selectItem', { step: step });

UPDATE:

After the last updates now it works with selectedItem

$('#MyWizard').wizard('selectedItem', { step: step });

Note the change from select to selected*.

Stephen Ostermiller
  • 23,933
  • 14
  • 88
  • 109
FlyBot
  • 196
  • 1
  • 4
  • 8
3

I don't think there is a way to directly set the active panel since the upcoming steps are disabled until activated using prev/next.

Once a step has been "activated" you could use jquery to trigger a tab click..

$('[data-target=#step2]').trigger("click");

Here is a working example: http://www.bootply.com/60319 -- If you navigate to the last step (5), there is a link that returns to step 2.

Carol Skelly
  • 351,302
  • 90
  • 710
  • 624
  • 1
    Nice answer, thanks! I added a GitHub issue to enable this through a more accessible method: https://github.com/ExactTarget/fuelux/issues/194 – Adam Alexander Jun 05 '13 at 10:49
2

$('#MyWizard').wizard('selectedItem', { step: currentStep });

1

I know this question is old, but I wanted to share what worked for me in Fuel FX 2.x:

$('#MyWizard').wizard('selectedItem', { step: YourStepNumber });

E.g.:

$('#wizard1').wizard('selectedItem', { step: 7 });
arao6
  • 3,316
  • 5
  • 30
  • 51
1
$(document).ready(function() {
    $('#wizard').wizard();
    $('#wizard').find('ul.steps li').toggleClass('complete', true);

    $('#wizard').on('changed.fu.wizard', function (evt, data) {
        $('#wizard').find('ul.steps li').toggleClass('complete', true);
    });
});

This makes all steps clickable.

antoncom
  • 11
  • 2
1
$('#btnNext').on('click', function()
{
$('#orderWizard').wizard('next');
}

Above Code is for Manually Get the Next Pane for Previous One you can try Belowed One

$('#btnPrev').on('click', function()
{
$('#orderWizard').wizard('previous');
}
Akshay Tilekar
  • 1,910
  • 2
  • 12
  • 22
0

You can set the "active" class on the li tag and when renders the wizard, the acvite li is marked.

This is a example in symfony:

<li data-target="#step1" class="complete">
  <span class="step">1</span>
</li>
<li data-target="#step2" class="active">
  <span class="step">2</span>
</li>
ajaristi
  • 979
  • 1
  • 9
  • 16