When it works onLeaveStep, you can not use obj to determine the direction? Then will you only check when moving on to the next step?
Updated:
, . . jquery.smartWizard-2.0.js 186
if(!options.onLeaveStep.call(this,$(curStep))){
if(!options.onLeaveStep.call(this,$(curStep),$(selStep))){
, , . onLeaveStep, :
function leaveStep(from, to) {
var fromStepIdx = from.attr( "rel" );
var toStepIdx = to.attr( "rel" );
if ( toStepIdx < fromStepIdx )
{
return true;
}
$("form").validate();
if ($("form").valid())
return true;
return false;
}