Hi guys,
I have a php script which generates a pricelist in a table. Example of a generated table:
<table>
<thead>
<tr>
<th></th>
<th>100</th>
<th>+100</th>
</tr>
</thead>
<tbody>
<tr>
<th>A5<span>210x148</span></th>
<td>€65.00</td>
<td>€8</td>
</tr>
<tr>
<th>A4<span>297x210</span></th>
<td>€75.00</td>
<td>€16</td>
</tr>
</tbody>
</table>
Basically what I want to do is make a button to add VAT. So: take the values from the price cells, add 21% and replace the original value. If the button is clicked again, it restarts.
My issue is that I am not familiar with jquery and can not figure out how to extract and rewrite the values per cel. I can get the effect I want if I add an id to a cell, however I can't seem to figure out how to do it for all the cells. Another thing I can't get working is stripping away the currency sign to do the calculation.
Any help would be greatly appreciated.