The length of that bar depends on a number.
And the number become smaller,the length become shorter,and vice versa.
The length of that bar depends on a number.
And the number become smaller,the length become shorter,and vice versa.
Sounds like a progress bar. Include the relevant parts of JQuery UI, and simply do:
$("#progressbar").progressbar({ value: 42 });
This will turn a <div id="progressbar"></div>
into a almost half (42 %) colored progress bar.
Have a look at this. It is a simple article that it will do what you want.
6 jQuery Chart Plugins For Your App presents 6 fully featured plug-ins.