DataTables and Google maps and Uncaught TypeError: $(...).DataTable is not a function

DataTables and Google maps and Uncaught TypeError: $(...).DataTable is not a function

Jason B.Jason B. Posts: 1Questions: 1Answers: 0

Example 1. Datatables and Google Maps working together.
https://hr.world/test.php (Works)
https://hr.world/test-2.php (DataTables doesn't work)

So the only difference between test.php and test-2.php is that from the footer, I have removed 2 .js files that seem to control the preloading graphic. Which tells me that the site template is causing the problem. When you view the source code though, all the markup is there for the top nav/header, so some div is being hidden problem because of the preloader and never shown.

Of course after Googling for hours, I can't find the answer to what is causing the Uncaught TypeError: $(...).DataTable is not a function when the 2 footer .js files are included.

Any thoughts or comments on how to resolve would be great.

Thanks (TIA),

Jason

Answers

  • colincolin Posts: 15,237Questions: 1Answers: 2,598
    edited September 2020

    The one where it's working contains all the DataTables sources - both JS and CSS.

    Where it doesn't, only the CSS is present from our CDN - hence why it can't find the DataTables() method.

    So that will be the place to start.

    Colin

This discussion has been closed.