I’ve been trying various ways to plug in jQuery DataTables to my mvc app. After reading http://datatables.net/blog/Microsoft_CDN, I decided that using Microsoft’s CDN might be the easiest approach to just get a DataTable up and running.
I copied and pasted the exact code found in the blogs example into Index.vbhtml, but I get “$(“#example”).dataTable is not a function”. I also tried using the DataTable debugger but it does not find any DataTables on my page.
Because I’m an ASP.net noob and I haven’t found any similar problems anywhere, I feel that the problem is something simple that I’m just overlooking. So I apologize in advance if this is a ridiculous question, but any help is much appreciated.
I suspect a conflict with different versions of jquery. The version on the CDN and the version of jquery bundled in your MVC site could be conflicting.
Look in your /Views/Shared/_Layout.vbhtml (or _Layout.cshtml for C#) for this line:
Comment it out and try again, if it works then it was a conflict.