TypeError DataTable is not a function

0 votes

I am working on jQuery's Datatable JS for my project and I downloaded the complete library. But when I tried to incorporate them in WebForms, the CSS, and JS do not work at all.

Here is what I have done till now :

<html xmlns="http://www.w3.org/1999/xhtml">

<head runat="server">

    <title></title>

    <link href="css/jquery.dataTables.css" rel="stylesheet" type="text/css" />

</head>

<body>

    <form id="form1" runat="server">

    <div>

        <table id="myTable" class="display" cellspacing="0" width="100%">

            <thead>

                <tr>

                    <th>Name</th>

                    <th>Position</th>

                    <th>Office</th>

                    <th>Age</th>

                    <th>Start date</th>

                    <th>Salary</th>

                </tr>

            </thead>

            <tfoot>

                <tr>

                    <th>Name</th>

                    <th>Position</th>

                    <th>Office</th>

                    <th>Age</th>

                    <th>Start date</th>

                    <th>Salary</th>

                </tr>

            </tfoot>

            <tbody>

               <!-- table body -->

            </tbody>

        </table>

    </div>

    <script src="js/jquery.dataTables.js" type="text/javascript"></script>

    <script src="js/jquery.js" type="text/javascript"></script>

    <script type="text/javascript">

        $(document).ready(function () {

            $('#myTable').DataTable();

        });

    </script>

    </form>

</body>

</html>

I have done everything as in the manual but still, the rendering isn't as expected. and in the console I get the following errors:

ReferenceError: jQuery is not defined

TypeError: $(...).DataTable is not a function

Can someone please guide me in the right direction for this problem ?

Apr 29 in Git & GitHub by Kichu
• 17,230 points
81 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In Git & GitHub

0 votes
1 answer

How to forcefully commit a file to Git even if the file is ruled as unchanged?

This is simple, just follow the below ...READ MORE

answered Jul 11, 2018 in Git & GitHub by Sophie may
• 10,590 points
5,270 views
0 votes
1 answer
0 votes
1 answer

Is there a way to remove a directory from git repository?

This is simple, just follow the commands ...READ MORE

answered Jul 14, 2018 in Git & GitHub by Sophie may
• 10,590 points
393 views
0 votes
1 answer

How do I solve a Git checkout error: updating paths is incompatible with switching branches?

This error occurs when you are checking ...READ MORE

answered Jul 26, 2018 in Git & GitHub by Sophie may
• 10,590 points
5,616 views
+2 votes
5 answers

ERROR: 'git' is not recognized as an internal or external command.

You have to set your PATH to ...READ MORE

answered Aug 2, 2018 in Git & GitHub by Sophie may
• 10,590 points
40,978 views
0 votes
1 answer

Why is Git commit not functioning with Git Bash?

This occurs because you might have git ...READ MORE

answered Aug 7, 2018 in Git & GitHub by Sophie may
• 10,590 points
900 views
0 votes
1 answer

jQuery UI " $("#datepicker").datepicker is not a function"

I struggled with a similar problem for ...READ MORE

answered Feb 17 in Java by Soham
• 8,730 points
555 views
0 votes
1 answer

What is jQuery?

Hey, jQuery is a fast and concise JavaScript ...READ MORE

answered Feb 14, 2020 in JQuery by kartik
• 37,510 points
287 views
0 votes
1 answer

Uncaught TypeError: Cannot read property 'msie' of undefined - jQuery tools

Hello, Use the following script tag in your ...READ MORE

answered Apr 28, 2020 in JQuery by Niroj
• 82,680 points
7,974 views
0 votes
1 answer

Uncaught Error: Bootstrap's JavaScript requires jQuery

Hello @kartik, You have provided wrong order for ...READ MORE

answered Apr 28, 2020 in JQuery by Niroj
• 82,680 points
14,620 views
webinar REGISTER FOR FREE WEBINAR X
Send OTP
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP