Open aman-saggu-git opened 7 years ago
I think for it to work you need to return true/false. try like this:
$('#smartwizard').smartWizard({ onLeaveStep: myFunction }); function myFunction(obj, context){ alert(obj+context); return false; }
I have not tested though.
They work by with $.on hook: var smartWizardElement = $('#smartwizard').smartWizard({........}); smartWizardElement .on('leaveStep', callback); --> this works
@deathgore Yes you are right but how can I access context.fromStep
and context.toStep
variables.
smartWizardElement.on('leaveStep', function(event, context){
alert("Leaving step " + context.fromStep + " to go to step " + context.toStep);
// return false to stay on step and true to continue navigation
return true;
});
This returns undefined
:
"Leaving step undefined to go to step undefined"
I am using below code everything is working fine but i want to put validation and i used code as per your documentation. but OnLeaveStep event on below code is not even showing alert box Code -