I am using jQuery steps and everything seems to be working except I want to have a Finish/Save button for all the steps and perform different actions. Although according to its documentation the OnFinishing event has currentIndex as its argument, it doesn't look like it's being set probably and when I debug the code it's always undefined. Is there anything I'm missing in the settings?
$("#wizard").steps({
/* Appearance */
bodyTag: "section",
stepsOrientation: 1,//vertical
showFinishButtonAlways: true,
/* Behaviour */
enableAllSteps: true,
saveState: true,
/* Events */
onStepChanging: function (event, currentIndex, newIndex) {
return true;
},
onStepChanged: function (event, currentIndex, priorIndex) { },
onFinishing: function (event, currentIndex) {
console.log(currentIndex);
},
onFinished: function (event, currentIndex) {
console.log(currentIndex);
},
/* Labels */
labels: {
current: "current step:",
pagination: "Pagination",
finish: "Save",
next: "Next",
previous: "Previous",
loading: "Loading ..."
}
});