I am using ajax datatable as below
$(document).ready(function() {
var table = $('#table').dataTable( {
"iDisplayLength": 10,
"processing": true,
"serverSide": true,
"bStateSave": true,
"bDeferRender" : true,
"sAjaxSource": { "url":"<?php echo base_url()?>",
"type": "GET",
"orderClasses" : false
},
"fnCreatedRow": function( nRow, aData, iDataIndex )
{
},
"fnServerData": function (sSource, aoData, fnCallback) {
$.getJSON(sSource, aoData, function (json) {
fnCallback(json);
});
},
} );
});
data loads in table but now on next request I want to send last row details back to server.I can send data in fnServerData But I am not able to access last record inserted in table as it is dynamically rendered. I tried using
$('#table tr:last td:last').html()
in fnServerData its blank. How I can get this data in fnServerData