Which to use DataTable or dataTable?
Which to use DataTable or dataTable?

I was first using dataTable() (jquery object) which was working just fine, until I had to use table.column() and other similar methods. And so, I changed to DataTable() (api). Now methods like table.column() work, but other things don't. For example the plugin fnSetFilteringDelay does not work.
This is how I was using the filtering delay:
$(selector).dataTable().fnSetFilteringDelay(800);
Once I changed it to DataTable, I get the following error:
$(...).DataTable(...).fnSetFilteringDelay is not a function
Should I be able to accomplish the same thing whether I use the api or the jquery object? Or one has advantages over the other?
This question has an accepted answers - jump to answer
Answers
$().dataTable()
gives you the legacy API (fnSetFilteringDelay
is a legacy API method)$().DataTable()
gives you the modern API.The best solution would be to rewrite the legacy plug-in to use the new API.
You can use both forms:
Allan
Thanks Alan.