Title: Issue with datatable js
Last modified: February 21, 2021

---

# Issue with datatable js

 *  [softheart85](https://wordpress.org/support/users/softheart85/)
 * (@softheart85)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/issue-with-datatable-js/)
 * Hi, I have enqueued datatable library with a function, I have excluded script‘
   jquery.dataTables.min.js’ on plugin’ settings but on site’s page I receive this
   error: ‘jQuery(…).DataTable is not a function’, if i disable plugin this error
   not appears.
 * Could you help me? Thanks
 * add_action( ‘wp_enqueue_scripts’, ‘datatable_scripts’, 10 );
    function datatable_scripts(){
   wp_enqueue_style(‘jquery-datatables-css’,’[https://cdn.datatables.net/1.10.23/css/jquery.dataTables.min.css&#8217](https://cdn.datatables.net/1.10.23/css/jquery.dataTables.min.css&#8217););
   wp_enqueue_script(‘jquery-datatables-js’,’[https://cdn.datatables.net/1.10.23/js/jquery.dataTables.min.js&#8217](https://cdn.datatables.net/1.10.23/js/jquery.dataTables.min.js&#8217);,
   array(‘jquery’));
 *  wp_enqueue_style(‘jquery-datatables-responsicecss’,’[https://cdn.datatables.net/responsive/2.2.7/css/responsive.dataTables.min.css&#8217](https://cdn.datatables.net/responsive/2.2.7/css/responsive.dataTables.min.css&#8217););
   
   wp_enqueue_script(‘jquery-datatables-responsivejs’,’[https://cdn.datatables.net/responsive/2.2.7/js/dataTables.responsive.min.js&#8217](https://cdn.datatables.net/responsive/2.2.7/js/dataTables.responsive.min.js&#8217);,
   array(‘jquery-datatables-js’));
 * }

Viewing 15 replies - 1 through 15 (of 19 total)

1 [2](https://wordpress.org/support/topic/issue-with-datatable-js/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/issue-with-datatable-js/page/2/?output_format=md)

 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/issue-with-datatable-js/#post-14082557)
 * can you share your site’s URL so I can have a look softheart85 ?
 *  Thread Starter [softheart85](https://wordpress.org/support/users/softheart85/)
 * (@softheart85)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/issue-with-datatable-js/#post-14082888)
 * Yes, can i have your email? So I send link, user and password?
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/issue-with-datatable-js/#post-14082912)
 * afraid [sharing/ asking/ offering login data is not permitted on these forums](https://wordpress.org/support/guidelines/#the-bad-stuff),
   sorry :-/
 *  Thread Starter [softheart85](https://wordpress.org/support/users/softheart85/)
 * (@softheart85)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/issue-with-datatable-js/#post-14082951)
 * this is the page: [https://sviluppo.webbingit.it/aggiungi-licenze/](https://sviluppo.webbingit.it/aggiungi-licenze/),
   select an option and you can see error ‘jQuery(…).DataTable is not a function’
 * Now your plugin is actived.
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/issue-with-datatable-js/#post-14083011)
 * there’s also [https://cdn.datatables.net/responsive/2.2.7/js/dataTables.responsive.min.js?ver=5.5.3](https://cdn.datatables.net/responsive/2.2.7/js/dataTables.responsive.min.js?ver=5.5.3),
   maybe try excluding `cdn.datatables.net` ?
 *  Thread Starter [softheart85](https://wordpress.org/support/users/softheart85/)
 * (@softheart85)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/issue-with-datatable-js/#post-14083050)
 * It is need this library
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/issue-with-datatable-js/#post-14083053)
 * don’t know datatables, but it does seem it is needed yes.
 *  Thread Starter [softheart85](https://wordpress.org/support/users/softheart85/)
 * (@softheart85)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/issue-with-datatable-js/#post-14083125)
 * it is need for scope..could you resolve it?
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/issue-with-datatable-js/#post-14083133)
 * but let’s take step back; when `cdn.datatables.net` from AsyncJS, do the datatables
   work? and if not, what error do you see on the console?
 *  Thread Starter [softheart85](https://wordpress.org/support/users/softheart85/)
 * (@softheart85)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/issue-with-datatable-js/#post-14083154)
 * when cdn.datatables.net from AsyncJS what means?
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/issue-with-datatable-js/#post-14083160)
 * well, you earlier wrote
 * > I have excluded script ‘jquery.dataTables.min.js’ on plugin’ settings
 * so what happens if instead of `jquery.dataTables.min.js` you have `cdn.datatables.
   net` ?
 *  Thread Starter [softheart85](https://wordpress.org/support/users/softheart85/)
 * (@softheart85)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/issue-with-datatable-js/#post-14083238)
 * when in ‘Script Exclusion’ add jquery.dataTables.min.js this library is loading
   but I have this error ‘Uncaught TypeError: jQuery(…).DataTable is not a function’.
   If i disable your plugin this error disappears.
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/issue-with-datatable-js/#post-14083294)
 * but what happens if instead of `jquery.dataTables.min.js` you add `cdn.datatables.
   net`?
 *  Thread Starter [softheart85](https://wordpress.org/support/users/softheart85/)
 * (@softheart85)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/issue-with-datatable-js/#post-14083326)
 * same issue, Uncaught TypeError: jQuery(…).DataTable is not a function
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/issue-with-datatable-js/#post-14083514)
 * afraid I see the same error when AsyncJS is disabled (by adding `?aj_noptimize
   =1` to the URL) softheart85, so I think this might not be due to AsyncJS after
   all?

Viewing 15 replies - 1 through 15 (of 19 total)

1 [2](https://wordpress.org/support/topic/issue-with-datatable-js/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/issue-with-datatable-js/page/2/?output_format=md)

The topic ‘Issue with datatable js’ is closed to new replies.

 * ![](https://ps.w.org/async-javascript/assets/icon-128x128.png?rev=1839260)
 * [Async JavaScript](https://wordpress.org/plugins/async-javascript/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/async-javascript/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/async-javascript/)
 * [Active Topics](https://wordpress.org/support/plugin/async-javascript/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/async-javascript/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/async-javascript/reviews/)

 * 19 replies
 * 2 participants
 * Last reply from: [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * Last activity: [5 years, 3 months ago](https://wordpress.org/support/topic/issue-with-datatable-js/page/2/#post-14083655)
 * Status: not resolved