How do get DataTables to work
How do get DataTables to work
kcwardwell@hotmail.com
Posts: 1Questions: 1Answers: 0
I am a newbie to datatables. I have placed https://cdn.datatables.net/1.10.15/css/jquery.dataTables.min.css and https://cdn.datatables.net/1.10.15/js/jquery.dataTables.min.js on the page and
$(document).ready(function () {
alert("doc ready");
$("#foodtable").dataTable();
alert("post doc ready");
});
within script tags in the head tags. I get to the first alert but not the second. No error message is thrown.
Help.
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
did you have the debugger console open? If not, your browser options are probably set to ignore errors. We would have to see the whole page to figure out what was going on.
Make sure you have jQuery:
https://datatables.net/manual/installation#Dependencies
Also change this:
To this:
Notice the capital
D
in DataTable. Please see the first FAQ here for the explanation.https://datatables.net/faqs/index#Most-common-FAQs
Kevin