Can't get installation right
Can't get installation right
why is the following code not working (i just get a table witout css nor functionality):
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="//cdn.datatables.net/1.10.12/css/jquery.dataTables.css">
<script type="text/javascript" charset="utf8" src="//cdn.datatables.net/1.10.12/js/jquery.dataTables.js"></script>
<script src="jquery-1.12.2.min.js"></script>
<script type="text/javascript">
$(document).ready( function () {
$('#table_id').DataTable();
} );
</script>
</head>
<body>
Column 1 | Column 2 |
---|---|
Row 1 Data 1 | Row 1 Data 2 |
Row 2 Data 1 | Row 2 Data 2 |
</body>
</html>
This question has an accepted answers - jump to answer
Answers
I can see thet the table tags have disapeared, well they are in my html file.
DataTables is a plug-in to jQuery. Therefore, you need to include it after jQuery. At the moment its probably giving all sorts of errors in your browser's console.
Allan
Thank you. What a fantastic thing, the DataTables!