Uncaught TypeError: $(...).DataTable is not a function
Uncaught TypeError: $(...).DataTable is not a function

Link to test case: Unable to link as its behind a login
Debugger code (debug.datatables.net): tried to upload but received a 403 error related to CORS policy?
Error messages shown: jQuery.Deferred exception: $(...).DataTable is not a function TypeError: $(...).DataTable is not a function
Uncaught TypeError: $(...).DataTable is not a function
Description of problem: We have been using DataTables in multiple places with our Slate CRM platform for their web portals. The js and css are loaded from our template file and should be consistent across all portals, but for a new portal I have been working on today, it will not load no matter what I try. I have searched the error and all of the results point to jQuery not getting loaded first, but I can assure you it is. To reiterate, the code is template based and not unique to this new page.
I would love to give a link but the page is behind a login. I also used the debugger tool but when attempting to export the data back, I received an error. The debugger tool also reported that there are 0 tables available. I am happy to share whatever code snippets I can.
Answers
If you've confirmed that jQuery is being loaded, and that isn't the issue, then very likely I'd say that you have jQuery being loaded multiple times.
If the load order is:
Then the jQuery that "wins" (i.e. takes the
jQuery
and$
variables) will not have DataTables attached to it.If it isn't that, then I'm afraid I would need a link to the page. You can PM me the link and a login if that would work for you (and the above doesn't fix it - which from experience I think has a good chance of being the problem).
Allan
Allan, I sent you a PM with info.
I do not think there is another jQuery being loaded. I have tried my hardest to make it a direct copy of the working page.
@allan did you ever get a chance to look at this?
Sorry, not yet. I will later today or tomorrow morning. Will let you know
.
Allan