Uncaught TypeError: $(...).DataTable is not a function
Uncaught TypeError: $(...).DataTable is not a function
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Main</title>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css"/>
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.19/css/jquery.dataTables.css">
<script type="text/javascript">
$(document).ready(function () {
$('#example').DataTable(
{
"searching": false,
"paging": false,
"ordering": false
}
);
});
</script>
I tried everything but it just cant load the css to to table
Answers
Hi @luv_igniz ,
The error is because you haven't loaded the DataTables CSS, only the JS. Take a look at this example, it shows you the files you need to include,
Cheers,
Colin