Responsive Example
Responsive Example
I need some help understanding Responsive. Going through the documentation and I am getting into trouble. I have created a live demo to see maybe if there is something wrong in my setup.
<a class="jsbin-embed" href="http://live.datatables.net/tuzifaxe/1/embed?live">JS Bin demo</a>
Just in case the above link is not working...
live.datatables.net/tuzifaxe/1/edit
From my understand there are two ways to initialize it. I have chosen in demo page to use the html way. And I have set a priority to 3 columns that I want to see when a user views it on their phone. When I refresh the page and view on my chrome browser as an iPhone 5 it is showing everything. Maybe the frame that is in is not letting it now to be responsive?
Not sure what I am doing wrong. Can someone point me in the right direction? I am sure I am close, but not understanding what I am doing wrong.
Thank you.
This question has an accepted answers - jump to answer
Answers
The Responsive Javascript needs to be loaded after DataTables:
http://live.datatables.net/tuzifaxe/2/edit
Allan
I used the download configurators https://datatables.net/download/index and selected all the options I needed and chose the CDN links.
I am working with bootstrap3, and "Responsive" is one of the options I checked on the download page, yet it is not responsive on mobile view.
Do I still need to call responsive Js as in the above comment after dataTable CDN link??
Might be worth mentioning that on desktop view the table does not auto adjust to the new width when resizing the window. Not sure if they are related.
Removing quotes from
"responsive": true,
was the issue! it should beresponsive: true,
Now some CSS to do ...
That shouldn't have made any difference, but if its working now, excellent.
Allan