Single Page App mode (SPA)

In SiteGainer we have a ”single page app” mode. It’s activated by going to audience for the project and toggling the option on.

The SPA mode translates all javascript and jQuery into a dynamic proxy function that makes your code act according to SPA logic. This means that all javascript and jQuery functions get ”sg_” added before them automatically. If you have a custom function defined that has the same name as an official javascript function or a jQuery function. Please add a comment to that line like this to exclude it:

myWebsite.function.on("update",function() { //sg_no_spa_replace
console.log('Something changed');