{"id":8396593,"date":"2016-11-04T15:07:27","date_gmt":"2016-11-04T15:07:27","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/datatable-js-are-not-loaded\/"},"modified":"2016-11-04T15:07:27","modified_gmt":"2016-11-04T15:07:27","slug":"datatable-js-are-not-loaded","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/datatable-js-are-not-loaded\/","title":{"rendered":"datatable js are not loaded"},"content":{"rendered":"<p>The Tablepress plug works and it is possible to instert new tables. What doesn&#8217;t work is user sorting and selecting. The cause being that the required js scripts are not included. If I add this to my template it works:<\/p>\n<pre><code>&lt;script src=&quot;\/wp-content\/plugins\/tablepress\/js\/jquery.datatables.min.js&quot;&gt;&lt;\/script&gt;\n&lt;script type=&quot;text\/javascript&quot;&gt; jQuery(document).ready(function($){ $(&#039;#tablepress-11&#039;).dataTable({&quot;order&quot;:[],&quot;orderClasses&quot;:false,&quot;stripeClasses&quot;:[&#039;even&#039;,&#039;odd&#039;],&quot;pagingType&quot;:&quot;simple&quot;}); }); &lt;\/script&gt;<\/code><\/pre>\n<p>But that probably is not the idea of the plugin. <\/p>\n<p>How do I make sure that the datatable macros work?<\/p>\n","protected":false},"template":"","class_list":["post-8396593","topic","type-topic","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/8396593","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/8396593\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=8396593"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}