У меня есть такие данные
<table id="tbl-cfrmvsreal" class="dataTable table table-bordered table-hover table-full-width" width="100%" data-table="tablekk" data-detail="dthkksub">
<thead>
<tr>
<th rowspan="2">FACTORY NAME</th>
<th rowspan="2">CURRENCY</th>
<th colspan="3">JAN</th>
<th colspan="3">FEB</th>
<th colspan="3">MAR</th>
<th colspan="3">APR</th>
<th colspan="3">MAY</th>
<th colspan="3">JUN</th>
<th colspan="3">JUL</th>
<th colspan="3">AUG</th>
<th colspan="3">SEP</th>
<th colspan="3">OCT</th>
<th colspan="3">NOV</th>
<th colspan="3">DEC</th>
<th colspan="2">TOTAL <label id="tahun"></label></th>
</tr>
<tr>
<th>CFMD ORDER/ PROJECTION AMOUNT</th>
<th>AMOUNT REALISASI EXPORT</th>
<th>%</th>
<th>CFMD ORDER/ PROJECTION AMOUNT</th>
<th>AMOUNT REALISASI EXPORT</th>
<th>%</th>
<th>CFMD ORDER/ PROJECTION AMOUNT</th>
<th>AMOUNT REALISASI EXPORT</th>
<th>%</th>
<th>CFMD ORDER/ PROJECTION AMOUNT</th>
<th>AMOUNT REALISASI EXPORT</th>
<th>%</th>
<th>CFMD ORDER/ PROJECTION AMOUNT</th>
<th>AMOUNT REALISASI EXPORT</th>
<th>%</th>
<th>CFMD ORDER/ PROJECTION AMOUNT</th>
<th>AMOUNT REALISASI EXPORT</th>
<th>%</th>
<th>CFMD ORDER/ PROJECTION AMOUNT</th>
<th>AMOUNT REALISASI EXPORT</th>
<th>%</th>
<th>CFMD ORDER/ PROJECTION AMOUNT</th>
<th>AMOUNT REALISASI EXPORT</th>
<th>%</th>
<th>CFMD ORDER/ PROJECTION AMOUNT</th>
<th>AMOUNT REALISASI EXPORT</th>
<th>%</th>
<th>CFMD ORDER/ PROJECTION AMOUNT</th>
<th>AMOUNT REALISASI EXPORT</th>
<th>%</th>
<th>CFMD ORDER/ PROJECTION AMOUNT</th>
<th>AMOUNT REALISASI EXPORT</th>
<th>%</th>
<th>CFMD ORDER/ PROJECTION AMOUNT</th>
<th>AMOUNT REALISASI EXPORT</th>
<th>%</th>
<th>CFMD ORDER/ PROJECTION AMOUNT</th>
<th>AMOUNT REALISASI EXPORT</th>
</tr>
</thead>
<tfoot>
<tr>
<th> </th>
<th>USD</th>
<th><span id="janorderusd"></span></th>
<th><span id="janactusd"></span></th>
<th> </th>
<th><span id="feborderusd"></span></th>
<th><span id="febactusd"></span></th>
<th> </th>
<th><span id="marorderusd"></span></th>
<th><span id="maractusd"></span></th>
<th> </th>
<th><span id="aprorderusd"></span></th>
<th><span id="apractusd"></span></th>
<th> </th>
<th><span id="mayorderusd"></span></th>
<th><span id="mayactusd"></span></th>
<th> </th>
<th><span id="junorderusd"></span></th>
<th><span id="junactusd"></span></th>
<th> </th>
<th><span id="julorderusd"></span></th>
<th><span id="julactusd"></span></th>
<th> </th>
<th><span id="augorderusd"></span></th>
<th><span id="augactusd"></span></th>
<th> </th>
<th><span id="seporderusd"></span></th>
<th><span id="sepactusd"></span></th>
<th> </th>
<th><span id="octorderusd"></span></th>
<th><span id="octactusd"></span></th>
<th> </th>
<th><span id="novorderusd"></span></th>
<th><span id="novactusd"></span></th>
<th> </th>
<th><span id="decorderusd"></span></th>
<th><span id="decvactusd"></span></th>
<th> </th>
<th><span id="sumorderusd"></span></th>
<th><span id="sumactusd"></span></th>
</tr>
<tr>
<th> </th>
<th>IDR</th>
<th><span id="janorderidr"></span></th>
<th><span id="janactidr"></span></th>
<th> </th>
<th><span id="feborderidr"></span></th>
<th><span id="febactidr"></span></th>
<th> </th>
<th><span id="marorderidr"></span></th>
<th><span id="maractidr"></span></th>
<th> </th>
<th><span id="aprorderidr"></span></th>
<th><span id="apractidr"></span></th>
<th> </th>
<th><span id="mayorderidr"></span></th>
<th><span id="mayactidr"></span></th>
<th> </th>
<th><span id="junorderidr"></span></th>
<th><span id="junactidr"></span></th>
<th> </th>
<th><span id="julorderidr"></span></th>
<th><span id="julactidr"></span></th>
<th> </th>
<th><span id="augorderidr"></span></th>
<th><span id="augactidr"></span></th>
<th> </th>
<th><span id="seporderidr"></span></th>
<th><span id="sepactidr"></span></th>
<th> </th>
<th><span id="octorderidr"></span></th>
<th><span id="octactidr"></span></th>
<th> </th>
<th><span id="novorderidr"></span></th>
<th><span id="novactidr"></span></th>
<th> </th>
<th><span id="decorderidr"></span></th>
<th><span id="decvactidr"></span></th>
<th> </th>
<th><span id="sumorderidr"></span></th>
<th><span id="sumactidr"></span></th>
</tr>
</tfoot>
</table>
А вот и мой jquery
var table = $("#tbl-cfrmvsreal");
var target = table.attr('data-table');
//console.logconsole.log(host+'konrtakkerja/'+target);
var oTable = table.on( 'processing.dt', function ( e, settings, processing ) {
if (processing) {
$(this).find('tbody').addClass('load1 csspinner');
} else{
$(this).find('tbody').removeClass('load1 csspinner');
};
} ).DataTable({
"bServerSide": true,
"ajax": host+'datatable/'+target,
"columnDefs": [{
"targets": [ -1 ],
"className": "dt-body-left",
},
{
"targets": [ 2 ],
"className": "details-control",
}],
//add by tiar 5 mei 2017
"aoColumns": [null,null,null
,null,null,null
,null,{"sClass": "alignRight"},null
,null,{"sClass": "alignRight"}],
//end
"footerCallback": function ( row, data, start, end, display ) {
// I don't know how to put these code for footer
}
});
Но моя проблема в том, что он показывает ошибку Uncaught TypeError: Cannot set property 'nTf' of undefined
, я знаю, что означает эта ошибка, но мне нужно сделать второй ряд.
Я хочу сделать 2 строки в моем нижнем колонтитуле, первую строку для итоговой валюты в долларах США и вторую строку для суммарной валюты РДЭ. Но я не знаю, как это сделать. Любое решение для этих?
РЕДАКТИРОВАТЬ: Неважно, я нашел другое решение. Ну, это не лучший вариант для нижнего колонтитула. Я просто разделяю резюме на другие данные. Так что спасибо за помощь в моем вопросе.