Hinder script when changing page with ajax/smoothstate.js?

Hi,

I have a script that I only want to run on a certain page (fullpage.js) , and this I have solved by putting the script inside the template rather then in my js file, which also lets me put some php in the script which I need.

This all works well when it’s a normal site with page reloads etc. However I use smoothstate.js for a better experience when navigating the site, which means that there are no full page reloads, which in turn means that after the script has been run, its still running even when i change page, which breaks the site.

So, do anyone know how i could make this script behave like it would with page reloads, only running on this certain page (index.php)?

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.