No way to know which step is being performed,if some step not bind element
Description
the change() callback is just get the bind element.But if it not have element and I performed some rollback and forward operations,I would lose the step number.
I second that. I would like to have a second parameter for introJs.onchange(), introJs.onbeforechange() and introJs.onafterchange() that takes the corresponding step data in case you used the json config method.
You can get the current step number, and use that to get the original step data:
const intro = introJs({
steps: [{
intro: 'Hello World!',
customData: {myCustomField: 'my custom value'}
}]
});
const currentStepData = intro._options.steps[intro._currentStep];
console.log(currentStepData.customData);
// my custom value
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.