Jump to content

Widget not displaying first time when landing on page

Go to solution Solved by paul2009,

Recommended Posts

  • Solution
10 minutes ago, SeanCrafted said:

I have to refresh the page for the widget to appear.

See my guide here: Why does Squarespace code only work on refresh?

  If this post has helped you, please click a 'Like' or 'Thanks' icon below  ⬇️

Improve your online store with our extensions.
About: Squarespace Circle Leader since 2017. I value honesty, transparency, appreciation and great design ♥.
Work: Squarespace Developer and founder of SF Digital, building the features Squarespace didn't include™.
Content: Links in my posts may refer to SF Digital products or may be affiliate links.

Buy me a coffee

Link to comment

Or you could disable Ajax Loading. Third party widgets won't have been written to take account of this Squarespace 7.0 specific feature.

Improve your online store with our extensions.
About: Squarespace Circle Leader since 2017. I value honesty, transparency, appreciation and great design ♥.
Work: Squarespace Developer and founder of SF Digital, building the features Squarespace didn't include™.
Content: Links in my posts may refer to SF Digital products or may be affiliate links.

Buy me a coffee

Link to comment
2 hours ago, SeanCrafted said:

Never mind I read what your link said, so it is definitely best to get code re-written.


Thanks

You can rewrite your snippet using the ajax callback, code will re run whenever ajax triggered

document.addEventListener('DOMContentLoaded', customCode);
window.addEventListener('mercury:load', customCode);

function customCode(){
   console.log('woohoo!');
}

 

Greeting, it's BeyondSpace, I am Squarespace dev focus on provide solutions to enhance feature that squarespace.com can't provide.
Feel free to check my current Squarespace Plugins Developement: Enable Pinch/Zoom on lightbox, Delivery Date Picker, Keyword Highlighter
If you find my answer fit your need, let's leave a like or upvote so others with the same issue can find their solution. Thank you

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.