Hi Guys,

I am looking for a javascript function that adds together a total based on how many checkboxes are checked.

For example, here are some checkboxes:

HTML Code:
<input type="checkbox" name="jobad[]" value="{$values[i].id}" checked>
<input type="checkbox" name="jobad[]" value="{$values[i].id}" checked>
<input type="checkbox" name="jobad[]" value="{$values[i].id}" checked>
<input type="checkbox" name="jobad[]" value="{$values[i].id}">
Each checkbox will be worth 29.99, so the total as shown above would be 89.97. So basically when each checkbox is checked it should add 29.99 to the total and if it is unchecked it should subtract 29.99 from the total.

Any ideas on how to do this?