Uncaught TypeError: $(...).DataTable is not a function
Uncaught TypeError: $(...).DataTable is not a function
Europia79
Posts: 2Questions: 1Answers: 0
Trying to get DataTables working, but it's not displaying.
http://198.143.136.199/datatables/testcase1/
The relevant lines of are
55: jquery.min.js
56: jquery.dataTables.js
329: <table> starting point
2813: DataTable() method invocation on $('#TableID')
I ran the HTML code thru a validator & removed all the errors.
Then I ran the browser console & DataTables debugger.
The debugger shows version information, but errors out on other the other checks.
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
You are loading jQuery twice. Once from the Google CDN and again in
default_layout.js
. That second one is erasing the first which has DataTables attached to it.Allan
Yes, it works! Thankyou!
http://198.143.136.199/datatables/testcase2/
I also thought jquery was being loaded twice, hence the original comment on line 54.
But I didn't know where it was being loaded from.
What was your thought process for figuring this out ?
Btw, this should be added to the FAQ ?