I am trying to use datatables.net by copying the CDN download method.I am using ASP.NET Web Application (.NET Framework) with mvc
(https://i.stack.imgur.com/FuYKd.png)
and adding a Javascript item like this:
$(document).ready(function () {
$('myTable').DataTable({
"scrollY": "450px",
"scrollCollapse": true,
"paging": true
});
});
But the Datatable functionalities is not showing on my table and I get this error:
(https://i.stack.imgur.com/ZNdgg.png)
CodePudding user response:
You have not provided the markup but you might be missing a '#' before myTable so try $('#myTable').DataTable .... if 'myTable' is your element's id;