Question

FuelUX Wizard component - how to allow user to go directly to the last step??

I'm able work with FuelUX Wizard but my need is i want first and last button with next and previous.

i am trying this example

http://bootply.com/74471

any help on this please.

Was it helpful?

Solution

Here is an example to allow moving a wizard to the last step. This is presented as a utility function because the wizard itself doesn't (yet?) have this method.

function wizardMoveLast($wizard) {
    var $steps = $wizard.find('.steps li');
    var currentStep = $steps.filter('.active').index() + 1;
    var distance = $steps.length - currentStep;

    for (var i = 0; i < distance; i++) {
        $wizard.wizard('next');
    }
}

wizardMoveLast($('#MyWizard'));

OTHER TIPS

And here is a second example:

var $total = $('#my-wizard').find('li').length;

$('#my-wizard').wizard('selectItem', { step: $total });

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top