Datatables not working with Meteor
Datatables not working with Meteor
anubhav756
Posts: 1Questions: 1Answers: 0
I'm trying to include a Datatable in a Meteor app, but getting this error:
Uncaught TypeError: $(...).DataTable is not a function(…)
Inside my client/
folder, in the main.html
file, I have this minimal code:
<head>
<script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
<script src="http://cdn.datatables.net/1.10.13/js/jquery.dataTables.js"></script>
<link rel="stylesheet" href="http://cdn.datatables.net/1.10.13/css/jquery.dataTables.css">
</head>
<body>
<table id="tableId"></table>
<script>
$(document).ready(function () {
$('#tableId').DataTable();
});
</script>
</body>
Here's a demo of my problem
PS - when I run the HTML file itself (without Meteor), I don't get this error. So, is it something wrong between Datatable and Meteor, or am I missing something here?
This discussion has been closed.