I am using a jQuery-steps on my app to for a wizard-like situation. I am having trouble finding out how to change to a custom step though. Any help with this one?
$(function () {
$("#wizard").steps({
headerTag: "h2",
bodyTag: "section",
transitionEffect: "slideLeft",
enableFinishButton: false,
labels: {
next: $('#next').html(),
previous : $('#previous').html()
},
onStepChanged: function (event, currentIndex, priorIndex)
{
if( priorIndex == 0) {
var selected = $('input[name=radio_wizard]:checked', '#radio_wizard').val()
switch( selected ){
case 1:
// GOTO 1
break;
case 2:
// GOTO 2
break;
case 3:
// GOTO 3
break;
}
}
}
}
How to achieve this?
Basing on @AbdulJamal answer, I've implemented it for any step:
Note that
step
variable must be defined and equal or greater than 0.I found a simple way to do this. you can use the jquery function
assuming you know what step you want to go to. this example would bring you to the third step of the wizard. use chromes editor to figure out what the exact id is of the step you want to go to.
Created this new function:
Call that is not implemented, put this:
works just fine