Responsive not Working
Responsive not Working
ITP
Posts: 8Questions: 3Answers: 0
All-
I have my tables working but want to use responsive to create the child rows. I have the responsive code in my concatenated files and have the responsive : true after my Ajax call, my data comes in but it won't use responsive. Everything else is still working, my search, pagination, etc. I've already tried reordering my javascript sources just in case and I tried switching to the CDNs too. I can't figure out why it won't work. Please help?
$(document).ready(function () { $('#example').DataTable({ "ajax": "data/arrays.txt", responsive: true, }); });This discussion has been closed.
Answers
Can you post a link to your page or to a test case showing the issue?
https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case
Without seeing the failure its hard to say what the issue is as it is related to something in your site. One thing to check is to make sure you have
style="width:100%"
in yourtable
tag.Kevin
http://live.datatables.net/nudopena/1/edit
Here's just a sample with some data that I've been testing and can't get to work.
Your Javascript isn't valid and is throwing an error on the browser's console. Correcting it allows Responsive to run: http://live.datatables.net/nudopena/2/edit .
See this part of the documentation for how to set options.
Allan