I see a few threads (here and here) on this error, but none of which seem to solve my issue. What is weird is that I'm receiving the TypeError: c is undefined
error on my website, but if I copy/paste my table into a fiddle then it works fine without giving me the error.
Because I'm using Squarespace Version 5, I have the following code injection after the "content" element:
<script src="http://www.quelqueshoe.org/storage/javascript/jquery-3.3.1.min.js"></script>
<script src="http://www.quelqueshoe.org/storage/javascript/popper-1-14-3.js"></script>
<script src="http://www.quelqueshoe.org/storage/javascript/bootstrap-4-1-3.js"></script>
<script src="http://www.quelqueshoe.org/storage/javascript/datatables.min.js"></script>
<script src="http://www.quelqueshoe.org/storage/javascript/dataTables.bootstrap4.min.js"></script>
<script>
$(document).ready(function(){
$('table').DataTable();
});</script>
That away all I'm doing is loading the JS files and then initializing all <table>
elements based on the HTML that is static on the webpage.
I have 6 webpages that are giving me errors, however here is just one of them: http://www.quelqueshoe.org/leadership if you want to navigate the website, the other pages giving me the same error are: Vigil, Newsletters, Uncas Award, Outstanding Arrowmen, and Founders Award
Here is a code fiddle where I copy/paste the markup for my table and then added the datatables CSS/JS CDN as well as the JQuery CDN: https://codepen.io/anon/pen/qLQZym
As you can tell in the fiddle it is working without giving me the error. So why is it that in a code fiddle it works fine, but on my live website it is giving me the error and not initializing the table?