Data Table is not a function on AEM Edit Mode | Community
Skip to main content
October 16, 2015
Solved

Data Table is not a function on AEM Edit Mode

  • October 16, 2015
  • 4 replies
  • 1939 views

Hi everyone,

I'm facing the problem with the jQuery DataTables error like "dataTable is not a function".

It's working on my local instance on Edit and Disabled mode. But on Client Development Environment it's throwing the error "dataTable is not a function".

We included their Header and Footer components which have JS for responsive, touch support and etc. Can you please let us know the possible ways to get ride of the issue. We are calling dataTable as follows:

$('.paymentHistoryDataTable').dataTable();

Please give me suggestions as early as possible to resolve it.

Regards,

Vijay Kanajam 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by smacdonald2008

This may be a loading issue with the JQuery plug-in  - see this:

https://datatables.net/forums/discussion/21223/uncaught-typeerror-undefined-is-not-a-function

4 replies

smacdonald2008
smacdonald2008Accepted solution
Level 10
October 16, 2015

This may be a loading issue with the JQuery plug-in  - see this:

https://datatables.net/forums/discussion/21223/uncaught-typeerror-undefined-is-not-a-function

Sham_HC
Level 10
October 16, 2015

Issue happens if required library is missing or not loaded.

October 16, 2015

Thanks for the information and we are working on the same as per your input.

But just one more question. Why it's working on local instance and why not on dev. environment as the code what we have in my local same is available in Dev.

Can you please let me know what we did wrong or any mistakes.

Thanks in advance.

Regards,

Vijay Kanajam

Sham_HC
Level 10
October 16, 2015

Vijay Kanajam wrote...

Thanks for the information and we are working on the same as per your input.

But just one more question. Why it's working on local instance and why not on dev. environment as the code what we have in my local same is available in Dev.

Can you please let me know what we did wrong or any mistakes.

Thanks in advance.

Regards,

Vijay Kanajam

 


Generally missing to push all the changes causes it. Comparing instance will give a clue.