Thursday, November 21, 2019 4:17:05 AM
  • Posted: Saturday, November 2, 2019 12:03 AM
  • 2
I am trying to add DataTables plugin to one of my pages and no matter where I put the js and css links I get errors. I tried head.cshtml in DefaultClean and the root body and head as well and I still causes javascript errors. I even tried in the body of the cshtml view I am creating. Examples. Am I putting the right references?

$(document).ready(function() {
} );

Html.AppendScriptParts(ResourceLocation.Footer, "~/scripts/DataTables/datatables.min.js", themeName);
Html.AppendCssFileParts(ResourceLocation.Head, "~/scripts/DataTables/datatables.min.css", themeName);

or SampleView.cshtml:

@*<script type="text/javascript" src=""></script>*@ <----Already included in head.cshtml right?
    <script type="text/javascript" src=""></script>
    <link rel="stylesheet" type="text/css" href="" />

jquery.min.js:2 Uncaught TypeError: $(...).DataTable is not a function
at HTMLDocument.<anonymous> (localhost/:2343)
at l (jquery.min.js:2)
at c (jquery.min.js:2)
  • Posted: Tuesday, November 5, 2019 9:52 AM
  • Moderator
  • 368
We don't use DataTables in GrandNode. Is it related with GrandNode plugin?