I had the same requirements for creating a kind of tracking of the progress of the steps, so I created a JavaScript plugin for this. Below is a JsFiddle to demonstrate this step progress tracker. You can access its GitHub code.
This basically means that it takes json data as input (in the specific format described below) and creates a progress tracker on it. Highlighted steps show completed steps.
This html will look like below using CSS by default, but you can customize it according to the theme of your application. There is also the option to display tooltip text for each step.
Here is the code snippet for this:
//container div <div id="tracker1" style="width: 700px"> </div> //sample JSON data var sampleJson1 = { ToolTipPosition: "bottom", data: [{ order: 1, Text: "Foo", ToolTipText: "Step1-Foo", highlighted: true }, { order: 2, Text: "Bar", ToolTipText: "Step2-Bar", highlighted: true }, { order: 3, Text: "Baz", ToolTipText: "Step3-Baz", highlighted: false }, { order: 4, Text: "Quux", ToolTipText: "Step4-Quux", highlighted: false }] }; //Invoking the plugin $(document).ready(function () { $("#tracker1").progressTracker(sampleJson1); });
I hope it will be useful for someone else!

Sanjeev Rai Oct 27 '14 at 18:35 2014-10-27 18:35
source share