On a “York” template [index] page, I use jQuery {Header Code Injection} to modify the URL of a [Page] link on that [index], allowing me to effectively add a [Link] to an [index] with a photo background that is displayed with the rest of the content on the [index].
The code works fine when the [index] loads or is hard-refreshed by the browser. It does not work after Ajax is used to soft-refresh only the [index] page content and not the <head>, <footer>, or other surrounding elements. This happens consistently when users navigate around the site.
My question: How do you detect an [index] Ajax reload in Squarespace and subsequently re-run {Header/Footer Code Injection} using jQuery (or an alternate method)?
For clarity when talking about traditional web and Squarespace features simultaneously:
“Squarespace proper names " [ Squarespace page types ] { Squarespace settings } < Standard HTML >
Question
TQM5 50
On a “York” template [index] page, I use jQuery {Header Code Injection} to modify the URL of a [Page] link on that [index], allowing me to effectively add a [Link] to an [index] with a photo background that is displayed with the rest of the content on the [index].
The code works fine when the [index] loads or is hard-refreshed by the browser. It does not work after Ajax is used to soft-refresh only the [index] page content and not the <head>, <footer>, or other surrounding elements. This happens consistently when users navigate around the site.
Squarespace notes this Ajax usage in the “York” template docs, specifying it cannot be removed. (See: https://support.squarespace.com/hc/en-us/articles/218212297-York-structure-and-style#toc-page-loading)
My question: How do you detect an [index] Ajax reload in Squarespace and subsequently re-run {Header/Footer Code Injection} using jQuery (or an alternate method)?
For clarity when talking about traditional web and Squarespace features simultaneously:
“Squarespace proper names "
Edited by TQM5[ Squarespace page types ]
{ Squarespace settings }
< Standard HTML >
Initial Revision
Link to post
Top Posters For This Question
10
7
2
1
Popular Days
Mar 16
5
Mar 14
4
Sep 26
3
Sep 11
2
Top Posters For This Question
therobhayes 10 posts
TQM5 7 posts
digitalfreelancer 2 posts
squaresporks 1 post
Popular Days
Mar 16 2017
5 posts
Mar 14 2017
4 posts
Sep 26 2016
3 posts
Sep 11 2016
2 posts
22 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment