Part of a table created in an MVC View:
Some of the HTML behind it:
...
<tr>
<td>
<div id="implG13">252,849.00</div>
</td>
<td>
<div id="progressBarG13"></div></td>
<td>
<div id="unimplG13">234,687.00</div>
</td>
</tr>
<tr>
<td>
<div id="implG19">239,773.00</div>
</td>
<td>
<div id="progressBarG19"></div></td>
<td>
<div id="unimplG19">174,397.00</div>
</td>
</tr>
...
I want to be able to display a Progress Bar on each row of the table, between these two columns, that graphically represents the percentage of 'cost savings' that have been implemented.
i.e. for the first row the JQuery might be something like:
function CalculatePercentage(){
return ($("#implG13").val() / ($("#implG13").val() + $("#unimplG13").val()));
}
$("#progressbarG13").progressbar({
$value : CalculatePercentage()
});
The problem is that the Table has a variable number of rows. I can programmatically assign unique IDs to reference the 'implemented cost saving value', the 'unimplemented cost saving value' and the progress bar on each row.
How can I implement this in JQuery so that I don't have to create a new function that explicitly references these IDs, kind of like named parameters in C#?
This is my first time programming in JQuery(is JQuery a javascript library or something?) so excuse my naivety please!

tr