Responsive datatables
Responsive datatables
jojo____
Posts: 9Questions: 5Answers: 0
Hello everyone,
I am working with Datatable and it is all working fine. I use bootstrap but I don't use it with the datatables. I have the last version of datatables available but when I add the attribute responsive: true to my datatable, I get the error that I need datatables 1.10 or newer. But I'm sure that I have the last version !
Is there something that doesnt work when I use bootstrap ? Is there another way to make the datatables responsive ?
Thanks,
This discussion has been closed.
Answers
Did you read the docs thoroughly?
http://datatables.net/extensions/responsive/
You need the correct css and js files.
Yes I included all the files needed. Chrome is showing me the lines in the responsive.js file which are testing the version and saying I dont have the right one but I do:
* @version 1.10.1
* @file jquery.dataTables.js
Here are the lines that are showed in chrome; where the error happens :
var Responsive = function ( settings, opts ) {
// Sanity check that we are using DataTables 1.10 or newer
if ( ! DataTable.versionCheck || ! DataTable.versionCheck( '1.10.1' ) ) {
throw 'DataTables Responsive requires DataTables 1.10.1 or newer';
}
else if ( settings.responsive ) {
return;
}
Can you link use to the page so I can debug the problem please?
Thanks,
Allan
Euh I didn't understand. What should I link ? It is the js page of datatables ^^
Please give us the URL of the page you are working on so I can access it. See: http://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case
Allan
Did you initiate it with a .DataTable and not a .dataTable? If you are initiating it with .dataTable then you are not using v.1.10 but the older version.
To qualify that, you will not be getting a 1.10 style API object if you use
.dataTable()
. You can still use.dataTable()
, but it returns a jQuery object, with the old style API (FAQ).Allan