I just tried put DataTable in my project. It look cool and robust. For quick result, I put this instruction into html file and it worked like charm. This is the screenshot.
Confidence with that html result, then, I created a new project in .Net Core 2 and put those code into About/Contact template page. What I removed html code to cshtml are head and body tag. But I got plain table like this, the screenshot.
What I tried to do, debugged the javascript by using F12 Developer Tools and I found "Object doesn't support property or method 'DataTable.'"
Why this could happen in VS 2017 .net core 2 ? Meanwhile, it works well in html file.
I emphasize the link (css and js) just works fine in html but it doesn't work in VS 2017 .Net Core 2.
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.16/css/jquery.dataTables.min.css">
<script src="https://code.jquery.com/jquery-1.12.4.min.js" type="text/javascript"></script>
<script src="https://cdn.datatables.net/1.10.16/js/jquery.dataTables.min.js" type="text/javascript" ></script>
<script>
$(document).ready(function() {
$('#example').DataTable();
} );
</script>
How to overcome this ? Please, advice....
Do I miss something ridiculous ?