dkilby
asked on
Javascript + php - hide value from array
I am using the below code in a php page that populates a datatable, it is not my own code, code i found on the web. when the datatable populates from the below code, I want the first value in the array to be hidden, there are multiple rows in the array so the first value of each row is the one that I want hidden - could someone help me understand where in this code i could do this
<script type="text/javascript" language="javascript" >
$(document).ready(function() {
var dataTable = $('#availgames-grid').DataTable( {
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.