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

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.

Answers:

Answer

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'));
Answer

And here is a second example:

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

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

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.