Squarespace ajax loading do not display custom code
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}
After a day off being stuck, about why on earth i wouldnt get my jquery custom code to work on SquareSpace template; i found that this is due to the AJAX loading.
So yes, the script runs when:
- U go directly to the page via the URL.
- U refresh the page after landing on it.
I've find that i must disable Ajax load on Design Panel which is not possible with my client request, i must have the ajax load enabled for smooth navigation.
Is there any code that i can add to display my content created with code injection?
Template : Shift
Website : Link here
Thanks
ajax squarespace
|
show 2 more comments
After a day off being stuck, about why on earth i wouldnt get my jquery custom code to work on SquareSpace template; i found that this is due to the AJAX loading.
So yes, the script runs when:
- U go directly to the page via the URL.
- U refresh the page after landing on it.
I've find that i must disable Ajax load on Design Panel which is not possible with my client request, i must have the ajax load enabled for smooth navigation.
Is there any code that i can add to display my content created with code injection?
Template : Shift
Website : Link here
Thanks
ajax squarespace
Information such as what template you are using and a link to the site itself may be helpful to others in proposing a solution.
– Brandon
Nov 27 '17 at 13:36
Hi Brando this issue is common to all the templates with ajax load my template is Shift here is the link rudolf-buchbinder-2.squarespace.com/timeline
– RedaZZ
Nov 27 '17 at 14:39
The issue is common to templates with the AJAX-loading option. However, the solution varies by template family, which is why that is important information. The template ID in the source code of your site indicates you are using a template from the Brine/Wright family (not Shift, but the possibility exists I am incorrect). Therefore, this answer ought to work: stackoverflow.com/a/42604055/5338581
– Brandon
Nov 27 '17 at 14:50
Hi @Brandon thank you for your answer it helped me solve my issue, i've tried this code on other website before didn't know that works for some templates but not all of them.
– RedaZZ
Nov 27 '17 at 17:18
Glad to help. Consider up-voting said answer if it helped you.
– Brandon
Nov 27 '17 at 17:27
|
show 2 more comments
After a day off being stuck, about why on earth i wouldnt get my jquery custom code to work on SquareSpace template; i found that this is due to the AJAX loading.
So yes, the script runs when:
- U go directly to the page via the URL.
- U refresh the page after landing on it.
I've find that i must disable Ajax load on Design Panel which is not possible with my client request, i must have the ajax load enabled for smooth navigation.
Is there any code that i can add to display my content created with code injection?
Template : Shift
Website : Link here
Thanks
ajax squarespace
After a day off being stuck, about why on earth i wouldnt get my jquery custom code to work on SquareSpace template; i found that this is due to the AJAX loading.
So yes, the script runs when:
- U go directly to the page via the URL.
- U refresh the page after landing on it.
I've find that i must disable Ajax load on Design Panel which is not possible with my client request, i must have the ajax load enabled for smooth navigation.
Is there any code that i can add to display my content created with code injection?
Template : Shift
Website : Link here
Thanks
ajax squarespace
ajax squarespace
edited Feb 23 '18 at 9:47
RedaZZ
asked Nov 27 '17 at 11:11
RedaZZRedaZZ
103
103
Information such as what template you are using and a link to the site itself may be helpful to others in proposing a solution.
– Brandon
Nov 27 '17 at 13:36
Hi Brando this issue is common to all the templates with ajax load my template is Shift here is the link rudolf-buchbinder-2.squarespace.com/timeline
– RedaZZ
Nov 27 '17 at 14:39
The issue is common to templates with the AJAX-loading option. However, the solution varies by template family, which is why that is important information. The template ID in the source code of your site indicates you are using a template from the Brine/Wright family (not Shift, but the possibility exists I am incorrect). Therefore, this answer ought to work: stackoverflow.com/a/42604055/5338581
– Brandon
Nov 27 '17 at 14:50
Hi @Brandon thank you for your answer it helped me solve my issue, i've tried this code on other website before didn't know that works for some templates but not all of them.
– RedaZZ
Nov 27 '17 at 17:18
Glad to help. Consider up-voting said answer if it helped you.
– Brandon
Nov 27 '17 at 17:27
|
show 2 more comments
Information such as what template you are using and a link to the site itself may be helpful to others in proposing a solution.
– Brandon
Nov 27 '17 at 13:36
Hi Brando this issue is common to all the templates with ajax load my template is Shift here is the link rudolf-buchbinder-2.squarespace.com/timeline
– RedaZZ
Nov 27 '17 at 14:39
The issue is common to templates with the AJAX-loading option. However, the solution varies by template family, which is why that is important information. The template ID in the source code of your site indicates you are using a template from the Brine/Wright family (not Shift, but the possibility exists I am incorrect). Therefore, this answer ought to work: stackoverflow.com/a/42604055/5338581
– Brandon
Nov 27 '17 at 14:50
Hi @Brandon thank you for your answer it helped me solve my issue, i've tried this code on other website before didn't know that works for some templates but not all of them.
– RedaZZ
Nov 27 '17 at 17:18
Glad to help. Consider up-voting said answer if it helped you.
– Brandon
Nov 27 '17 at 17:27
Information such as what template you are using and a link to the site itself may be helpful to others in proposing a solution.
– Brandon
Nov 27 '17 at 13:36
Information such as what template you are using and a link to the site itself may be helpful to others in proposing a solution.
– Brandon
Nov 27 '17 at 13:36
Hi Brando this issue is common to all the templates with ajax load my template is Shift here is the link rudolf-buchbinder-2.squarespace.com/timeline
– RedaZZ
Nov 27 '17 at 14:39
Hi Brando this issue is common to all the templates with ajax load my template is Shift here is the link rudolf-buchbinder-2.squarespace.com/timeline
– RedaZZ
Nov 27 '17 at 14:39
The issue is common to templates with the AJAX-loading option. However, the solution varies by template family, which is why that is important information. The template ID in the source code of your site indicates you are using a template from the Brine/Wright family (not Shift, but the possibility exists I am incorrect). Therefore, this answer ought to work: stackoverflow.com/a/42604055/5338581
– Brandon
Nov 27 '17 at 14:50
The issue is common to templates with the AJAX-loading option. However, the solution varies by template family, which is why that is important information. The template ID in the source code of your site indicates you are using a template from the Brine/Wright family (not Shift, but the possibility exists I am incorrect). Therefore, this answer ought to work: stackoverflow.com/a/42604055/5338581
– Brandon
Nov 27 '17 at 14:50
Hi @Brandon thank you for your answer it helped me solve my issue, i've tried this code on other website before didn't know that works for some templates but not all of them.
– RedaZZ
Nov 27 '17 at 17:18
Hi @Brandon thank you for your answer it helped me solve my issue, i've tried this code on other website before didn't know that works for some templates but not all of them.
– RedaZZ
Nov 27 '17 at 17:18
Glad to help. Consider up-voting said answer if it helped you.
– Brandon
Nov 27 '17 at 17:27
Glad to help. Consider up-voting said answer if it helped you.
– Brandon
Nov 27 '17 at 17:27
|
show 2 more comments
1 Answer
1
active
oldest
votes
Squarespace uses their own AJAX loader called mercury.
https://github.com/Squarespace/squarespace-mercury
To hook into it try adding the following event listener.
document.addEventListener('DOMContentLoaded', customCode);
window.addEventListener('mercury:load', customCode);
function customCode(){
console.log('woohoo!');
}
1
A bit of explanation why this answer is correct would be appreciated.
– ToothlessRebel
Jan 3 at 22:43
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f47509602%2fsquarespace-ajax-loading-do-not-display-custom-code%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Squarespace uses their own AJAX loader called mercury.
https://github.com/Squarespace/squarespace-mercury
To hook into it try adding the following event listener.
document.addEventListener('DOMContentLoaded', customCode);
window.addEventListener('mercury:load', customCode);
function customCode(){
console.log('woohoo!');
}
1
A bit of explanation why this answer is correct would be appreciated.
– ToothlessRebel
Jan 3 at 22:43
add a comment |
Squarespace uses their own AJAX loader called mercury.
https://github.com/Squarespace/squarespace-mercury
To hook into it try adding the following event listener.
document.addEventListener('DOMContentLoaded', customCode);
window.addEventListener('mercury:load', customCode);
function customCode(){
console.log('woohoo!');
}
1
A bit of explanation why this answer is correct would be appreciated.
– ToothlessRebel
Jan 3 at 22:43
add a comment |
Squarespace uses their own AJAX loader called mercury.
https://github.com/Squarespace/squarespace-mercury
To hook into it try adding the following event listener.
document.addEventListener('DOMContentLoaded', customCode);
window.addEventListener('mercury:load', customCode);
function customCode(){
console.log('woohoo!');
}
Squarespace uses their own AJAX loader called mercury.
https://github.com/Squarespace/squarespace-mercury
To hook into it try adding the following event listener.
document.addEventListener('DOMContentLoaded', customCode);
window.addEventListener('mercury:load', customCode);
function customCode(){
console.log('woohoo!');
}
edited Jan 3 at 23:46
Lex
2,14222542
2,14222542
answered Jan 3 at 22:38
PaulPaul
11
11
1
A bit of explanation why this answer is correct would be appreciated.
– ToothlessRebel
Jan 3 at 22:43
add a comment |
1
A bit of explanation why this answer is correct would be appreciated.
– ToothlessRebel
Jan 3 at 22:43
1
1
A bit of explanation why this answer is correct would be appreciated.
– ToothlessRebel
Jan 3 at 22:43
A bit of explanation why this answer is correct would be appreciated.
– ToothlessRebel
Jan 3 at 22:43
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f47509602%2fsquarespace-ajax-loading-do-not-display-custom-code%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Information such as what template you are using and a link to the site itself may be helpful to others in proposing a solution.
– Brandon
Nov 27 '17 at 13:36
Hi Brando this issue is common to all the templates with ajax load my template is Shift here is the link rudolf-buchbinder-2.squarespace.com/timeline
– RedaZZ
Nov 27 '17 at 14:39
The issue is common to templates with the AJAX-loading option. However, the solution varies by template family, which is why that is important information. The template ID in the source code of your site indicates you are using a template from the Brine/Wright family (not Shift, but the possibility exists I am incorrect). Therefore, this answer ought to work: stackoverflow.com/a/42604055/5338581
– Brandon
Nov 27 '17 at 14:50
Hi @Brandon thank you for your answer it helped me solve my issue, i've tried this code on other website before didn't know that works for some templates but not all of them.
– RedaZZ
Nov 27 '17 at 17:18
Glad to help. Consider up-voting said answer if it helped you.
– Brandon
Nov 27 '17 at 17:27