core 3.1 Consol $(...).DataTable is not a function

core 3.1 Consol $(...).DataTable is not a function

PixeloPixelo Posts: 9Questions: 3Answers: 0
edited July 2021 in Free community support


I'm want use your datatable in my project .NET Core3.1 MVC but $(...).DataTable is not a function

In my earlier project MVC (2 years earlier) MVC it worked perfectly.

<html lang="en"><head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Home Page - sfp_permit</title>
    <link rel="stylesheet" href="/lib/bootstrap/dist/css/bootstrap.min.css">
    <link rel="stylesheet" href="/css/site.css">
    <script type="text/javascript" charset="utf8" src=""></script>
    <link rel="stylesheet" type="text/css" href="">
    <script type="text/javascript" charset="utf8" src=""></script>
        <nav class="navbar navbar-expand-sm navbar-toggleable-sm navbar-light bg-white border-bottom box-shadow mb-3">
            <div class="container">
                <a class="navbar-brand" href="/Home">sfp_permit</a>
                <button class="navbar-toggler" type="button" data-toggle="collapse" data-target=".navbar-collapse" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
                    <span class="navbar-toggler-icon"></span>
                <div class="navbar-collapse collapse d-sm-inline-flex flex-sm-row-reverse">
                    <p class="nav navbar-text navbar-right">Hello, SFPZAPA\zgodkad!</p>
                    <ul class="navbar-nav flex-grow-1">
                        <li class="nav-item">
                            <a class="nav-link text-dark" href="/">Raport uprawnień</a>
    <div class="container">
        <main role="main" class="pb-3">
<div class="text-center">
    <select id="UsersList" class="form-control" onchange="changeUser()" name="UserId">
        <option value="">Wybierz operatora</option>
    <div id="reportZapaNet"><script type="text/javascript">
    $(document).ready(function () {

<table id="ReportTableZapaNet" class="display" style="width:100%">
            <th>Nazwa roli w AD</th>
            <th>Opis roli w AD</th>
            <th>Nazwa uprawnienia</th>
            <th>Opis uprawnienia</th>


    <footer class="border-top footer text-muted">
        <div class="container">
            © 2021 - sfp_permit - <a href="/Home/Privacy">Privacy</a>
    <script src="/lib/jquery/dist/jquery.min.js"></script>
    <script src="/lib/bootstrap/dist/js/bootstrap.bundle.min.js"></script>
    <script src="/js/site.js?v=4q1jwFhaPaZgr8WAUSrux6hAuh0XDg9kPS3xIVq36I0"></script>
    <script src="/Scripts/IndexReportPermission.js"></script>


Edited by Kevin: Syntax highlighting. Details on how to highlight code using markdown can be found in this guide


  • kthorngrenkthorngren Posts: 16,808Questions: 25Answers: 3,983

    You are loading jQuery twice; one line line 7 and the other in line 81. You will want to load it only once for the page..


  • PixeloPixelo Posts: 9Questions: 3Answers: 0

    I spent a few hours on it, I forgot that core loads libraries at the end

Sign In or Register to comment.