I am trying to build a progress indicator that I can dynamically change with javascript.
Currently I have the following in the document.
And the css
indicator.gif is 400px x 10px and is half white and half grey, so all I am doing is using css to offset the image.
However in order to reuse this I don't want to have to create styles for 100 options. I would like to be able to just use a function to pass in what % I want displayed.
Any one got any ideas on how to achieve this?
Cheech
[Peace][Pipe]
Currently I have the following in the document.
Code:
<div id="ind_head">10%</div>
<div id="ind_10"></div>
<div id="ind_head">20%</div>
<div id="ind_20"></div>
Code:
div#ind_10, div#ind_20{
width:200px;
height:10px;
}
div#ind_10 {
background:url(indicator.gif) no-repeat;
background-position:-180px;
}
div#ind_20 {
background:url(indicator.gif) no-repeat;
background-position:-160px;
}
However in order to reuse this I don't want to have to create styles for 100 options. I would like to be able to just use a function to pass in what % I want displayed.
Any one got any ideas on how to achieve this?
Cheech
[Peace][Pipe]