SeanCrafted Posted December 8, 2021 Share Posted December 8, 2021 Site URL: https://www.fyeo-newcastle.co.uk/ Hi There, I'm hoping someone can help, I've added a widget to my site but when I land on the page it doesn't appear straight away- I have to refresh the page for the widget to appear. Can anyone help please? Beyondspace 1 Link to comment
Solution paul2009 Posted December 8, 2021 Solution Share Posted December 8, 2021 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 ⬇️ About: Squarespace Circle Leader since 2017. I value honesty, transparency, diversity 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. Catch up on all the release notes and announcements 2023 [for Circle members only]. There's a public version here too!If I helped, you can thank me by clicking one of the emojis below. If you prefer, you can buy me a coffee.Improve your online store with our extensions. Link to comment
SeanCrafted Posted December 8, 2021 Author Share Posted December 8, 2021 Thank you, you're link is correct, it appears to be old coding and will need to be re written. Thank you Link to comment
paul2009 Posted December 8, 2021 Share Posted December 8, 2021 Or you could disable Ajax Loading. Third party widgets won't have been written to take account of this Squarespace 7.0 specific feature. About: Squarespace Circle Leader since 2017. I value honesty, transparency, diversity 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. Catch up on all the release notes and announcements 2023 [for Circle members only]. There's a public version here too!If I helped, you can thank me by clicking one of the emojis below. If you prefer, you can buy me a coffee.Improve your online store with our extensions. Link to comment
SeanCrafted Posted December 8, 2021 Author Share Posted December 8, 2021 By disabling Ajax loading though, what difference would it make to the website? Does it make it more vulnerable at all? Do certain things not work? Beyondspace 1 Link to comment
SeanCrafted Posted December 8, 2021 Author Share Posted December 8, 2021 Never mind I read what your link said, so it is definitely best to get code re-written. Thanks Beyondspace 1 Link to comment
Beyondspace Posted December 8, 2021 Share Posted December 8, 2021 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, Lightbox Studio pluginIf 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
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment