jQuery not defined
-
Hi Frank!
First things first… Awesome plugin, cannot get my head around how you manage to provide such great level of functionality & support for free.
Excuse me if I don’t have all the concepts correctly stablished in my head or say something not very logical, fairly new to the WP optimization world and don’t have much understanding of JS, but doing my best!
These last days we’ve been trying to raise the pagespeed score for our website with great results using a combination of your Autoptimize and W3TC. Managed to eliminate render blocking CSS & JS (thanks for your guidance on critical css path) and we are almost perfectly happy with how things are at the moment. The only issue we seem to have right now is with Twenty20 image slider plugin, which uses jQuery.
Initially we had “js/jquery/jquery.js” excluded from autoptimize but this would result in a render blocking message on pagespeed, to get around this we used W3TC minify settings to inject in header using Async.
This seemed to do the trick, got rid of the pagespeed message but suddenly some of our Twenty20 sliders stopped working. For example on a page we have +20 sliders, only the first 6 would not work. When checking source code I can see some inline JS not being executed for the ones that don’t work.
Upon checking console I can see:
"Uncaught ReferenceError: jQuery is not defined at (index):272"
Also if I check source code, can also see at the very top, after <head> tag the W3TC file that has jquery inside:
"/wp-content/cache/minify/fedfa.default.include.279063.js"
But can also see references to jquery inside other file which is right before the </body> tag, I think generated by autoptimize?:
/wp-content/cache/autoptimize/autoptimize_3a43ccd4f89d4260b5095cb2a398c8e5.php
Any guidance you could give us on how to make those 6 sliders work? ??
Many, many thanks and hope you have a nice day.
- The topic ‘jQuery not defined’ is closed to new replies.