I think you could just do it all through jQuery. This is how I might think that this works, i.e. Not writing code, but helps you think more about it.
Firstly, you have several inputs, let's just say that there are 5 to make it easy, and they all are text type.
<input type="text" name="first" value="" /> <input type="text" name="second" value="" /> <input type="text" name="third" value="" /> <input type="text" name="fourth" value="" /> <input type="text" name="fifth" value="" />
Then let's say that this means that each of them costs 20%, and your progress bar starts at 0 when you enter the page.
HTML:
<div id="progressbar"></div>
JQuery
$( "#progressbar" ).progressbar({ value: 0 });
Then the simple task is to update this value when each item is changed.
First find the changes:
$('input').change(function(){
In fact, the next thing you need to remember is that value is both the receiver and the setter. So just get the value, assign it to a variable, and then update the value, which is likely to look something like this.
currentValue = parseInt($("#progressbar").progressbar('value')) + 20; $("#progressbar").progressbar('value',currentValue);
Again, I have not tested this, but this is my best guess about how very easy it is to do it.
source share