Problem initializing dataTable

Problem initializing dataTable

lgglgg Posts: 1Questions: 0Answers: 0
edited April 2013 in General
Hello, i've been trying to use datatable but without any success so far. I get the following error:

TypeError: $(...).dataTable is not a function
$('#index-table').dataTable(); Post (line 569)
fire(data=[Document Post, [function()]])jquery-1.9.1.js (line 1037)
fireWith(context=Document Post, args=[Document Post, [function()]])jquery-1.9.1.js (line 1148)
ready(wait=undefined)jquery-1.9.1.js (line 433)
completed(event=DOMContentLoaded )jquery-1.9.1.js (line 103)

I'm working on asp.net mvc, jQuery 1.9.1 and dataTables 1.9.4 the page is the following (minus content and Razor code):

[code]



test


test


Status




@Scripts.Render("~/bundles/jquery")
@Scripts.Render("~/bundles/jqueryui")
@Scripts.Render("~/bundles/datatable")


$(document).ready(function () {
$('#index-table').dataTable();
});

[/code]

First, I tried to install the plugin manually and I found that the nuget jquery package (1.7.x) was overriding the import I was using from a more recent version. I updated the nuget packages and installed this plugin from the nuget repository also, and that part was resolved but I still get this error. I imported jqueryui just in case (since I saw some posts mentioning it and thought it was required), but it didn't fix anything

Can someone help me? I know that it must be something silly but it escapes me right now

Thanks in advance
This discussion has been closed.