Using Rails I have built a web app. One of the pages of the web app displays a table which uses the DataTables API. This JSFiddle shows an example of what my web app looks l
You can add in a spinner gif (find one here: http://www.ajaxload.info/) as a div
where your table should be and then clear it when the table loads using initComplete
.
Put something like this right below And then call your table like this:
$(document).ready(function() {
var table = $('#app-list-table').DataTable({
//any other datatables settings here
"initComplete": function(settings, json) {
$('#loadingSpinner').hide();
//or $('#loadingSpinner').empty();
}
})
});