Is this the correct script?
Is this the correct script?
cchintall83
Posts: 36Questions: 11Answers: 0
in DataTables
Link to test case: https://codepen.io/jchintall2019/pen/yLvJxoG
Debugger code (debug.datatables.net): none
Error messages shown: none
Description of problem: When this script is run, the result is just the column headers. The table contents is not loaded. What is incorrect with the script which is linked to this question?
Thank you for any help!
This question has an accepted answers - jump to answer
Answers
Take a look at the browser's console for errors. You will see this:
You haven't loaded jQuery. You can use the Download Builder to get jquery.js or you can load it independently like this example.
Kevin
Hello,
Thank you for reviewing the script linked to the initial post. I added jquery-3.6.0.js.
No change: only the table's column headers are resulting. Here is the link with jquery loaded.
https://codepen.io/jchintall2019/pen/yLvJxoG](https://codepen.io/jchintall2019/pen/yLvJxoG "https://codepen.io/jchintall2019/pen/yLvJxoG")
Thanks again.
John
Datatables requires jQuery.jst to be loaded first. Move it above all the other
script
tags.Kevin
Hi,
The jQuery-3.6.9.js script link is above all other scripts; it is line 9.
https://codepen.io/jchintall2019/pen/yLvJxoG
I appreciate this help!
Thanks,
John
I always struggle with codepen, so I moved it into our version of jsbin - there it's working fine once the
$document
was fixed to$(document)
- please see http://live.datatables.net/fuyusowo/1/editColin
Hi Colin,
Thanks for the review and finding my mistake.
John