{"id":15032124,"date":"2021-11-03T11:23:36","date_gmt":"2021-11-03T11:23:36","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/plugin-is-not-enqueuing-js-properly\/"},"modified":"2021-11-03T11:23:36","modified_gmt":"2021-11-03T11:23:36","slug":"plugin-is-not-enqueuing-js-properly","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/plugin-is-not-enqueuing-js-properly\/","title":{"rendered":"Plugin is not enqueuing JS properly"},"content":{"rendered":"<p>Out of the box, this plugin doesn&#8217;t work because the placement of where you are just dumping out the variables in a &lt;script&gt; tag is not taking into account where I&#8217;ve placed my jQuery enqueue function&#8230;<\/p>\n<p>You&#8217;re just placing it somewhere in the footer, however the issue is your code is appearing before my call to jQuery (resulting in this not working at all).<\/p>\n<p>Is your plugin not loading based on the jQuery as a dependency?<\/p>\n<p>https:\/\/developer.wordpress.org\/reference\/functions\/wp_enqueue_script\/<\/p>\n","protected":false},"template":"","class_list":["post-15032124","topic","type-topic","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/15032124","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\/15032124\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=15032124"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}