Hello! Please tell me how to use Infinite scroll with Data table?
My code in ‘page content’ block:
<div class="data-table">
<div class="content-block">
<table>
<thead>
<tr>
<th class="numeric-cell">Column1</th>
<th class="numeric-cell">Column2</th>
<th class="numeric-cell">Column3</th>
</tr>
</thead>
<tbody id="rows">
</tbody>
</table>
</div>
</div>
Code in js:
app.request.post('rows.php', function (data) {
data=JSON.parse(data);
var html=''; var i=0;
while (i < data.length){
html+='<tr>'+
'<td class="numeric-cell">'+data[i].column1+'</td>'+
'<td class="numeric-cell">'+data[i].column2+'</td>'+
'<td class="numeric-cell">'+data[i].column3+'</td>'+
'</tr>';
i++;
};
$$('#rows').html(html);
});