I want to sort the list of exchange. it looks the values of foreign currencies. but, the country with the sort of value for money. transformed values and the sort, to show the actual values.
I could not sort by a value converted. was the sort of values that appear. How to sort with the values calculated. But the secret values calculated?
<script id="js">
var dolar = 1.7849;
var euro=2.3643;
var yen=1;
$(function() {
$("table").tablesorter({
theme: 'blue'
,headers: {
0: {
sorter: false
},
1: {
sorter: 'custom_sort_function'
},
2: {
sorter: false
}
}
});
});
</script>
<table class="tablesorter">
<thead>
<tr>
<th>ID</th>
<th>Money</th>
<th>Symbol</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>1</td><!-- exchenge value dolar * cellvalue -->
<td>USD</td>
</tr>
<tr>
<td>2</td>
<td>1</td><!-- exchenge value euro * cellvalue -->
<td>EUR</td>
</tr>
<tr>
<td>3</td>
<td>1YEN</td><!-- exchenge value yen * cellvalue -->
<td></td>
<td>TL</td>
</tr>
</tbody>
</table>
Sample View:
Sort Money Field ASC
ID Money Symbol
-- ------- ----------
1 1YEN YEN
2 1USD USD
3 1EURO EUR
Sort Money Field Desc
ID Money Symbol
-- ------- ----------
3 1EURO EUR
2 1USD USD
1 1YEN YEN