I have several rows that include some lazy loaded data. For instance,
<table border="1">
<tr>
<th>Employee</th><th>Sales</th>
</tr>
<tr>
<td>Michale</td><td>1000</td>
</tr>
<tr>
<td>Kim</td><td id="kimSales"></td>
</tr>
<tr>
<td>John</td><td id="johnSales"></td>
</tr>
</table>
The problem is, I have to retrieve some data after page loaded because of some reasons. Let's suppose kimSales is 1500, and johnSales is 2500.
<script>
$(document).on('ready', function(e){
$('#kimSales').text(1500);
$('#johnSales').text(2500);
})
</script>
In this situation, I want to sort properly with lazy loaded data. You know, jQuery dataTable has sorting features through click header of columns, like https://datatables.net I couldn't sort these data properly. The sorted data is not ascending, or dsc --- maybe dataTable couldn't recognize after loaded data.
What I tried :
<script>
$(document).on('ready', function(e){
$('#kimSales').text(1500);
$('#johnSales').text(2500);
})
table.dataTable(); // not properly working
</script>