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;
}







0















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










share|improve this question

























  • 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


















0















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










share|improve this question

























  • 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














0












0








0








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










share|improve this question
















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






share|improve this question















share|improve this question













share|improve this question




share|improve this question








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



















  • 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












1 Answer
1






active

oldest

votes


















0














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!');
}





share|improve this answer





















  • 1





    A bit of explanation why this answer is correct would be appreciated.

    – ToothlessRebel
    Jan 3 at 22:43












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
});


}
});














draft saved

draft discarded


















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









0














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!');
}





share|improve this answer





















  • 1





    A bit of explanation why this answer is correct would be appreciated.

    – ToothlessRebel
    Jan 3 at 22:43
















0














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!');
}





share|improve this answer





















  • 1





    A bit of explanation why this answer is correct would be appreciated.

    – ToothlessRebel
    Jan 3 at 22:43














0












0








0







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!');
}





share|improve this answer















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!');
}






share|improve this answer














share|improve this answer



share|improve this answer








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














  • 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




















draft saved

draft discarded




















































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.




draft saved


draft discarded














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





















































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







Popular posts from this blog

Monofisismo

Angular Downloading a file using contenturl with Basic Authentication

Olmecas