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: SQSP User for 17 yrs. Circle Leader since 2017. I value honesty, transparency, diversity and good design ♥. Work: Founder of SF Digital, building Squarespace Extensions to supercharge your commerce website. Content: Links in my posts may refer to SF Digital products or may be affiliate links. If my advice helped, you can thank me by clicking one of the feedback emojis below. I love coffee too. 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: SQSP User for 17 yrs. Circle Leader since 2017. I value honesty, transparency, diversity and good design ♥. Work: Founder of SF Digital, building Squarespace Extensions to supercharge your commerce website. Content: Links in my posts may refer to SF Digital products or may be affiliate links. If my advice helped, you can thank me by clicking one of the feedback emojis below. I love coffee too. 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!'); } BeyondSpace - Squarespace Website Developer 🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox) 🗓️ Delivery Date Picker (Squarespace Date format) 💫 Animated Buttons (Referral URL) 🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations) 🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates) If you find my answer useful, 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