jQuery-Smart-Wizard
jQuery-Smart-Wizard copied to clipboard
Step indexing: 0 or 1-based?
I notice that selected
is 0-based, but the context
variables supplied toonLeaveStep
and onShowStep
are 1-based. Is there a reason for this discrepancy?
What convention is used by errorSteps
, goToStep
, disableStep
, enableStep
and others?
Everything except that original 'selected' value is 1 based. The discrepancy was intentional for backwards compatibility with the original project.
To make it consistent I'd recommend deprecating 0-based selected
and supplementing it with a one-based selectedStep
or something of that sort.