dkilby
asked on
PHP + Datatable options
I am trying to change the options for a datatable, using the example from datatables.net, but not matter what I try it doenst work. the only option that is working is the hiding of the data for the first value - can someone tell me where I am going wrong.
<script type="text/javascript" language="javascript" >
$(document).ready(function() {
var dataTable = $('#availgames-grid').DataTable({
"scrollY": "200px",
"scrollCollapse": true,
"paging": false,
"language": [{
"emptyTable": "No Games Available, Check Back Soon.",
"infoEmpty": "No entries to show"
}],
"columnDefs": [{
"targets": [0],
"visible": false,
"searchable": false
}],
responsive: {
details: {
renderer: function(api, rowIdx) {
var data = api.cells(rowIdx, ':hidden').eq(0).map(function(cell) {
var header = $(api.column(cell.column).header());
return '<p style="color:#00A">' + header.text() + ' : ' + api.cell(cell).data() + '</p>';
}).toArray().join('');
return data ? $('<table/>').append(data) : false;
}
}
},
processing: true,
serverSide: true,
ajax: "availgames-grid-data.php", // json datasource
});
});
</script>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.