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>

Open in new window

dkilbyAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

lenamtlCommented:
Hi,

Can you set a Jsfiddle for this so I can see the problem?

First check if you have any error in console Chrome right click Inspect.

Most of the time with Responsive is that other options can be in conflict with
like fixed width, scroll, collapsed

So what you can do is to keep the minimum settings by removing scrollCollapse and scrollY and try new settings one by one to found the problem.

Also maybe the problem is with your datatabase query or other JS on the pages
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
PHP

From novice to tech pro — start learning today.