I have this table:
<table> <thead> <tr> <th>Quantity</th> <th> </th> <th>Price</th> <th>Sum</th> </tr></thead> <tbody> <tr class="sum"> <td><input class="qty" type="text" value="1" /></td> <td>German format: </td> <td data_price="1375.5">1.375,50 €</td> <td></td> </tr> <tr class="sum"> <td><input class="qty" type="text" value="1" /></td> <td>English format:</td> <td data_price="1375.5">€1,375.50</td> <td></td> </tr> <tr class="sum"> <td><input name="text" type="text" class="qty" value="1" /></td> <td>French format:</td> <td data_price="1375.5">1 375,50 €</td> <td></td> </tr> <tr class="sum"> <td><input name="text2" type="text" class="qty" value="1" /></td> <td>Italian format:</td> <td data_price="1375.5">€1,375.50</td> <td></td> </tr> <tr class="sum"> <td><input class="qty" type="text" value="1" /></td> <td>Spanish format:</td> <td data_price="1375.5">€ 1.375,50</td> <td></td> </tr> <tr> <td colspan="3">Total</td> <td id="total"></td> </tr> </tbody> </table>
and I want to use the value of the "data_price" attribute to calculate the SUM, as in this link: http://jsfiddle.net/QmTNZ/77/
I want to use only the "data_price" attribute in the calculation, not.
Please help, I'm still new to jquery :)
source share