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 me: I've been a SQSP User for 18 yrs. I was invited to join the Circle when it launched in 2016. I have been a Circle Leader since 2017. I don't work for Squarespace. I value honesty, transparency, diversity and good design ♥. Work: I founded and run SF.DIGITAL, building Squarespace Extensions to supercharge your commerce website. Content: Views and opinions are my own. Links in my posts may refer to SF.DIGITAL products or may be affiliate links. Forum advice is free. You can thank me by clicking one of the feedback emojis below. Coffee is optional. 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 me: I've been a SQSP User for 18 yrs. I was invited to join the Circle when it launched in 2016. I have been a Circle Leader since 2017. I don't work for Squarespace. I value honesty, transparency, diversity and good design ♥. Work: I founded and run SF.DIGITAL, building Squarespace Extensions to supercharge your commerce website. Content: Views and opinions are my own. Links in my posts may refer to SF.DIGITAL products or may be affiliate links. Forum advice is free. You can thank me by clicking one of the feedback emojis below. Coffee is optional. 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 picker form field) 💫 Gallery block 7.1 workaround 🥳 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