What is contained in the pg-interactions.js file? I’m guessing it is the script that is normally inline?
Hard to troubleshoot, but I’m guessing it has something to do with when interactions goes looking for page elements vs when they are loaded in. WHat templating language are you using, and when does the pgia.js load in? I’m wondering if you will have to pop a small script in after total load like:
let el = document.body;
This would be a bit of overkill if the nav menu is the only interaction, so you could make it mare targeted.
DUH! Sorry I missed the title of your post. Sometimes I can be an idiot.
Maybe this would help?
I guess you could load the pgia.js script in with a strategy of afterInteractive to allow Next to hydrate the page first?
Again, a little hard to troubleshoot. Not sure when in the page load/where on the page you injected the snippet above.
That script doesn’t power the interactions. It is there for when interactions is disabled. All of the actual interactions are in the pgia.js file. That is the one you should be loading with your strategy.
Not sure what you mean here. You can enable an animation only on mobile from within the Interactions panel of Pinegrow.
Thank You so much !
I changed to <Script src="pgia/lib/pgia.js" strategy="afterInteractive"></Script> and all is working now.
I thought the inline script has to do with initializing the pgia/lib/pgia.js script.
This came up on my weekly email so don’t mind if I pitch in. I’m not so sure on the status of this but seems you’ve solved something basic with an overly technical solution.