Show 10 empty table rows while loading the data to the table
Show 10 empty table rows while loading the data to the table
martin1223345
Posts: 84Questions: 23Answers: 0
Hey guys,
I am wondering if this is possible. I want show 10 empty rows while my table is loading. This so that I can add skeleton classes to the td elements while loading. Is this prosible? I cant find anything about this. This is what I tried.
processing: true,
language: { "processing": '<tr><td class="skeleton-loading" colspan="23"></td></tr><tr><td class="skeleton-loading" colspan="23"></td></tr><tr><td class="skeleton-loading" colspan="23"></td></tr><tr><td class="skeleton-loading" colspan="23"></td></tr>', search: '', searchPlaceholder: "Search in table...",
searchPanes: {
clearMessage: 'Reset Filters',
collapse: {0: 'Filters', _: 'Filters Active (%d)'} }},
This question has an accepted answers - jump to answer
Answers
You could do something like this: http://live.datatables.net/laniwido/1/edit
It starts by loading a table with ten empty records, then in
initComplete
, it sets an ajax url and loads it, usingajax.url().load()
,Colin