DataTables is not a function
DataTables is not a function
Link to test case: unable to share
Debugger code (debug.datatables.net): n/a
Error messages shown: DataTables is not a function
Description of problem: I have a page with a working DataTables, when adding another web part to that page the DataTables fail with error "DataTable is not a function". I am running in noconflict so my guess is that jquery is being loaded in the other webpart and breaking DataTables. I cannot see multiple jquery in network tab however. I am unable to edit the other webpart being added, would anyone have any hints in how I can ensure DataTables is loaded properly without the other part breaking it?
Answers
Happy to take a look at a test case showing the issue.
Allan
adding another web part to that page the DataTables fail with error "DataTable is not a function". I am running in noconflict so my guess is that jquery is being loaded in the other webpart and breaking DataTables. I cannot see multiple jquery in network tab however. I am unable to edit the other webpart being added, would anyone have any hints in how I can ensure DataTables is loaded properly without the other part
@sophiaabigail It would be worth checking the ordering of the scripts, and ensure jQuery is loaded first. If no success, as Allan said above, please link to a page demonstrating the issue.
Colin
Hello, thanks for your comments. I understand it is difficult to help when there is no test case. Unfortunately it is an internal system so I cannot show a test case. The issue is happening even when I use the datatables example table and script sources. The issue arrises only when the other webpart is added and I cannot change or manipulate the other webpart. Customer wants the table and the webpart
Is there anyway I can ensure jquery and datatables loads within my context only, and is not hindered/destroyed by the other webpart?
I'm not familiar with webpart. Someone else on the forum may have some ideas for you. I suggest looking at the webpart documentation or webpart specific support forums to learn how to integrate jQuery applications.
Kevin