Hey,
I've been trying to use datatables in an ASP.NET page but it just doesn't seem to work. My table is the following:
And my javascript section looks like this:
Uncaught TypeError: Object [object Object] has no method 'dataTable' SearchMembers:1283
(anonymous function) SearchMembers:1283
fire jquery-1.8.3.js:974
self.fireWith jquery-1.8.3.js:1084
jQuery.extend.ready jquery-1.8.3.js:406
DOMContentLoaded
After some searching I updated my jquery-ui to the latest (1.9.2) but it didn't help.
What am I doing wrong? I would so love to use datatables but I just can't get it working! Is it possible that I haven't copied some of the files or didn't copy them to the right place?
Thanks a lot in advance!
I've been trying to use datatables in an ASP.NET page but it just doesn't seem to work. My table is the following:
<table id="searchMembers"> <thead> <tr> <th>First Name</th> <th>Suname</th> <th>Email address</th> <th>Phone Number</th> </tr> </thead> <tbody> @foreach (var member in Model) { <tr> <td>@member.FirstName</td> <td>@member.SurName</td> <td>@member.Email</td> <td>@member.PhoneNumber</td> </tr> } </tbody> <tfoot> </tfoot> </table>
And my javascript section looks like this:
<script type="text/javascript" src="~/Scripts/jquery-1.8.3.js"></script> <script type="text/javascript"> $(document).ready(function () { $('#searchMembers').dataTable(); }); </script>When I load the page I get the following error:
Uncaught TypeError: Object [object Object] has no method 'dataTable' SearchMembers:1283
(anonymous function) SearchMembers:1283
fire jquery-1.8.3.js:974
self.fireWith jquery-1.8.3.js:1084
jQuery.extend.ready jquery-1.8.3.js:406
DOMContentLoaded
After some searching I updated my jquery-ui to the latest (1.9.2) but it didn't help.
What am I doing wrong? I would so love to use datatables but I just can't get it working! Is it possible that I haven't copied some of the files or didn't copy them to the right place?
Thanks a lot in advance!