Why DataTable() isn't working only dataTable() in 1.10?
Why DataTable() isn't working only dataTable() in 1.10?
Hi,
I use DataTables 1.10 for a while now, but now I faced a problem in my current project.
I always use the DataTable() type of initialization since 1.10, but it doesn't seem to work now. In this project DataTables JS is included in a big JS file and it works without any problem if I use the older dataTable() type of initialization. If try to create a DataTable with DataTable(), I get the "Uncaught TypeError: $(...).DataTable is not a function(…)
" error.
I've checked and the version that is included is the correct 1.10.10 that I have used before (there is no modification in it, it's included as is), and it is included in the correct order while dataTable() works fine.
I would like to continue using DataTable() version, so I would like to know what would be the problem here.
$(document).ready( function () {
var table1 = $('.dyntable1').dataTable(); // working
var table2 = $('.dyntable2').DataTable(); // not working
});
JS structure where plugins are included:
- jQuery v1.11.0
- jQuery Migrate v1.2.1
- jQuery UI - v1.10.0
- DataTables 1.10.10
- DataTables Bootstrap integration
Noconflict() is not used.
Thanks in advance.
This question has an accepted answers - jump to answer
Answers
Problem found: wrong js file was included where only version 1.8 was used... My mistake.
Thanks for posting back - good to hear you have it working now!
Allan