Archived topic
Header an back to top button not working
3 replies · Started by Robin on August 31, 2021
Hi,
I'm using CDN and cloud cashing for my site through the Ezoic add platform.
With this enabled the hamburger menu on mobile is no longer working and the back to top button doesn't show anymore.
On the desktop, the normal menu bar is working but the back to top button is not showing.
> How to exclude the header and back to top button from being cached?
> Or any other way to keep this functional?
Thanks a lot!
Hi there,
If you right click and inspect the front end of the site to open the developers console, in the Console tab you will see a Red Error: Uncaught ReferenceError: jQuery is not defined
Which means a script that requires jQuery was loaded and executed before the jQuery library was. This error 'breaks' the code and stops any subsequent scripts from running.
You need to check your optimization settings ( not sure if that is Ezoic or another plugin ) and ensure the jQuery is not combined or deferred from loading. As it needs to be loaded first.
Simplest fix is to disable and combining/minification of Javascript, clear your caches and the retest the site.
Hi David!
Solved the problem that was indeed caused by the Jquery optimization.
Thanks a lot!
Best wishes,
Robin
Glad to hear you resolved it!