data().sum() Undefined
data().sum() Undefined

I have loaded the sum() plugin from
<script src="https://cdn.datatables.net/plug-ins/2.3.1/api/sum().js"></script>
However I am getting
const sum = itemTable.column(4).data().sum()
sum as undefined,
itemTable.column(4).data()
is valid and the plugin has loaded in browser network.
Error in console
Uncaught TypeError: itemTable.column(...).data().sum is not a function
Do I need to do anything else to use this ?
Thanks
This question has an accepted answers - jump to answer
Answers
Your code snippets work in this test case:
https://live.datatables.net/lecipovi/1/edit
Do you get other errors besides sum being undefined?
What version of Datatables are you using? This version of the plugin might not work with DT 1.x.
Please provide a link to your page or a test case replicating the error so we can help debug.
https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case
Kevin
Thanks Kevin, I switched to loading it locally and all Ok.