Datatables ajax poc
Report
HTML
<script src="//code.jquery.com/jquery-1.9.1.js"></script>
<script src="http://code.jquery.com/ui/1.9.2/jquery-ui.js"></script>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.9.2/themes/base/jquery-ui.css">
<link rel="stylesheet" href="//cdn.datatables.net/1.10.1/css/jquery.dataTables.css">
<link rel="stylesheet" href="//cdn.datatables.net/responsive/1.0.0/css/dataTables.responsive.css">
<script src="//cdn.datatables.net/responsive/1.0.0/js/dataTables.responsive.js"></script>
<script src="//cdn.datatables.net/1.10.11/js/jquery.dataTables.js"></script>
<table id="example" class="display" cellspacing="0" width="100%">
<thead>
<tr>
<th>First Name</th>
<th>Last Name</th>
<th>Address</th>
</tr>
</thead>
</table>
JavaScript
$(document).ready(function() {
var table = $('#example').DataTable( {
responsive: true,
serverSide: false,
"ajax": {
url: "/echo/json/",
method: 'POST',
data: function ( d ) {
;
},
"dataSrc": function ( json ) {
debugger;
return json.data;
}
}
} );
} );