mstratman / jQuery-Smart-Wizard

flexible jQuery plug-in that gives wizard like interface
http://mstratman.github.com/jQuery-Smart-Wizard/
304 stars 164 forks source link

Step indexing: 0 or 1-based? #73

Open garychapman opened 9 years ago

garychapman commented 9 years ago

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?

mstratman commented 9 years ago

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.