I am curious how can a javascript (or also benefiting from jquery) based progress indicator such can be developed:
alt text http://img707.imageshack.us/img707/3295/dealindicator.png
My first idea is something such as:
function drawBar(total,sofar){
.........................
}
where it consumes the max number(20 in our case) and sofar (15 for the picture).
But how can it be implemented?
Is there any jquery based plugin to achieve this?
Regards
This is usually done with CSS, by creating a
divthe total size of your progressbar, and then having anotherdivchild of that which has a percentage width of how much needs to be filled.You can style the
divs anyway you want. You likely want to style the inner div withbackground-color, orbackground-image&background-repeat. It can be a solid colour, a gradient, or a banded pattern, which seems to be rather popular.Have you Google’d for jQuery plugins? They are fairly easy to find. Here’s one for example: http://t.wits.sg/jquery-progress-bar/