Simple Wizard using Knockout.js

My scenario isn't all that simple tho. Imagine I have a customer type on my wizard and depending on this type, I have to choose the next step of the wizard. How would you do it with less code in a more reusable, easy to modify way?

To give you an idea, I have setup a jsfiddle for you.

Let me see if I can embed it here...



Note: I have used the following libs.

underscore.js  - http://jashkenas.github.io/underscore/

knockout - http://knockoutjs.com/

twitter-bootstrap  - http://getbootstrap.com/

The code should be easier to follow.
 
There is a "stepModels" array containing all the steps and its related templates. it also contains template type option which indicates the path it should take if the customer type is a business.

commented almost every step of the code so it should be easier to understand.
 

Popular posts from this blog

Print a receipt using a Thermal Printer with C#.NET

Automatic redirect upon session timeout using ASP.NET MVC and Javascript

Complex Master-Detail Form using Knockout.js and ASP.NET MVC