$(document).ready(function() {
$('#stat-table').dataTable(stat_options); {
"fnFooterCallback": function ( nRow, aaData, iStart, iEnd, aiDisplay ) {
/*
* Calculate the total market share for all browsers in this table (ie inc. outside
* the pagination)
*/
var iPengind = 0;
for ( var i=0 ; i<aaData.length ; i++ )
{
iPending += aaData[i][4]*1;
}
/* Calculate the market share for browsers on this page */
var iApproved = 0;
for ( var i=iStart ; i<iEnd ; i++ )
{
iApproved += aaData[ aiDisplay[i] ][4]*1;
}
/* Modify the footer row to match what we want */
approvedAll.innerHTML = parseInt(iApproved);
pendingAll.innerHTML = parseInt(iPending);
}
} );