Using draw without JS files
Using draw without JS files

Is it possible to use draw without using the datatables.min.js? I have my own custom JS for the datatables but draw doesn't seem to work using a range filter. I get "Uncaught TypeError: table.draw is not a function".
var table = $('#example').dataTable({
'pageLength': 25,
'columnDefs': [
{
"targets": [ 5 ],
"visible": false
},
]
});
$('#slider-range').change( function() {
table.draw();
});
Thank you.
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
See this FAQ. You have
But you need to use
DataTable
with a capitalD
, like this:Kevin
Thank you that worked. Now I need to figure out how to fix the filters in the head. Here is a before and after changing it to the Capital version.
Before

After

You can always go back to using the old version
var table = $('#example').dataTable({
then change your click event to get the API, for example:Otherwise please provide a link to your page or a test case replicating the issue so we can help debug.
https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case
Kevin
Amazing, Thank you. This will allow so much more for my building.