Inline JS not declared properly.
-
When I use a JS minification plugin (like Autoptimize), the Catapult Cookie Consent inline JS cannot run because it is loaded before jQuery.
I get this in the browser console:Uncaught ReferenceError: jQuery is not defined at (index):47
which reads:
<script type="text/javascript">jQuery(document).ready(function($){ if(!catapultReadCookie("catAccCookies")){
I believe the issue is that inline script found in
public/class-ctcc-public.php:191
is not declared with dependency on jQuery. I think it should use the https://developer.www.ads-software.com/reference/functions/wp_add_inline_script/More details here: https://wordpress.stackexchange.com/questions/24851/wp-enqueue-inline-script-due-to-dependancies
Please could you add the dependency to the inline script?
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Inline JS not declared properly.’ is closed to new replies.