문제

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.

도움이 되었습니까?

해결책

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

다른 팁

And here is a second example:

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

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top